<commit_before>from selenium import webdriver

from django.test import override_settings
from django.contrib.auth import get_user_model
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.contrib.sites.models import Site

from wizard_builder.models import PageBase


User = get_user_model()


@override_settings(DEBUG=True)
class FunctionalTest(StaticLiveServerTestCase):

    @classmethod
    def setUpClass(cls):
        super(FunctionalTest, cls).setUpClass()
        # cls.browser = webdriver.Firefox()
        cls.browser = webdriver.PhantomJS()
        cls.browser.implicitly_wait(3)
        Site.objects.update(domain='localhost')
        User.objects.create_superuser('user', '', '<PASSWORD>')
        cls.login_admin()

    @classmethod
    def tearDownClass(cls):
        cls.browser.quit()
        super(FunctionalTest, cls).tearDownClass()

    @classmethod
    def login_admin(cls):
        cls.browser.get(cls.live_server_url + '/admin/login/')
        cls.browser.find_element_by_id('id_username').clear()
        cls.browser.find_element_by_id('id_username').send_keys('user')
        cls.browser.find_element_by_id('id_password').clear()
        cls.browser.find_element_by_id('id_password').send_keys('<PASSWORD>')
        cls.browser.find_element_by_css_selector('input[type="submit"]').click()

    def setUp(self):
        super(FunctionalTest, self).setUp()
        self.browser.get(self.live_server_url + '/admin/')

    def test_can_load_admin_with_wizard_builder_on_it(self):
        self.assertTrue('Django administration' in self.browser.page_source)
        self.assertTrue('Wizard Builder' in self.browser.page_source)<commit_msg>tests all add tomorrow<commit_after>from selenium import webdriver

from django.test import override_settings
from django.contrib.auth import get_user_model
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.contrib.sites.models import Site

from wizard_builder.models import PageBase


User = get_user_model()


@override_settings(DEBUG=True)
class FunctionalTest(StaticLiveServerTestCase):

    @classmethod
    def setUpClass(cls):
        super(FunctionalTest, cls).setUpClass()
        # cls.browser = webdriver.Firefox()
        cls.browser = webdriver.PhantomJS()
        cls.browser.implicitly_wait(3)
        Site.objects.update(domain='localhost')
        User.objects.create_superuser('user', '', '<PASSWORD>')
        cls.login_admin()

    @classmethod
    def tearDownClass(cls):
        cls.browser.quit()
        super(FunctionalTest, cls).tearDownClass()

    @classmethod
    def login_admin(cls):
        cls.browser.get(cls.live_server_url + '/admin/login/')
        cls.browser.find_element_by_id('id_username').clear()
        cls.browser.find_element_by_id('id_username').send_keys('user')
        cls.browser.find_element_by_id('id_password').clear()
        cls.browser.find_element_by_id('id_password').send_keys('<PASSWORD>')
        cls.browser.find_element_by_css_selector('input[type="submit"]').click()

    def setUp(self):
        super(FunctionalTest, self).setUp()
        self.browser.get(self.live_server_url + '/admin/')

    def test_can_load_admin_with_wizard_builder_on_it(self):
        self.assertTrue('Django administration' in self.browser.page_source)
        self.assertTrue('Wizard Builder' in self.browser.page_source)

    def test_can_see_all_models(self):
        pass

    def test_pagebase_models_downcast(self):
        pass

    def test_can_access_question_page_through_page_base(self):
        pass

    def test_question_page_question_inline_present(self):
        pass

    def test_question_page_local_fields_present(self):
        pass

    def test_form_question_models_downcast(self):
        pass

    def test_multiple_choice_models_downcast(self):
        pass

    def test_can_access_radio_button_from_form_question(self):
        pass

    def test_radio_button_choices_present(self):
        pass
{'fraction_non_alphanumeric': 0.10348283638185918, 'fraction_numerical': 0.0005011275369581559, 'mean_word_length': 3.892156862745098, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6395791', 'n_tokens_mistral': 1228, 'n_tokens_neox': 1197, 'n_words': 179}