<commit_before>from django.test import LiveServerTestCase
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.webdriver import WebDriver


class SeleniumTestCase(LiveServerTestCase):

    @classmethod
    def setUpClass(cls):
        cls.selenium = WebDriver()
        super(SeleniumTestCase, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(SeleniumTestCase, cls).tearDownClass()
        cls.selenium.quit()

class ContactAppTests(SeleniumTestCase):

    def test_contact(self):
        selenium = self.selenium

        # Opening the Contact-us page to test
        selenium.get('http://127.0.0.1:8000/contact-us/')

        # find the form elements
        name = selenium.find_element_by_id('id_your-name')
        email = selenium.find_element_by_id('id_your-email-address')
        message = selenium.find_element_by_id('id_your-message')
 
        submit = selenium.find_element_by_name('Send')
 
        # Fill the form with Sample data
        name.send_keys('<NAME>')
        email.send_keys('<EMAIL>')
        message.send_keys('Test message for sample test.')
 
        # Submitting the form
        submit.send_keys(Keys.RETURN)
 
        # Check the returned result
        assert 'Thanks for you interest' in selenium.page_source

if __name__ == '__main__':
    unittest.main(warnings='ignore')<commit_msg>error removed in contact test<commit_after>from django.test import LiveServerTestCase
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.webdriver import WebDriver


class SeleniumTestCase(LiveServerTestCase):

    @classmethod
    def setUpClass(cls):
        cls.selenium = WebDriver()
        super(SeleniumTestCase, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(SeleniumTestCase, cls).tearDownClass()
        cls.selenium.quit()

class ContactAppTests(SeleniumTestCase):

    def test_contact(self):
        selenium = self.selenium

        # Opening the Contact-us page to test
        selenium.get('http://127.0.0.1:8000/contact-us/')

        # find the form elements
        name = selenium.find_element_by_id('id_your-name')
        email = selenium.find_element_by_id('id_your-email-address')
        message = selenium.find_element_by_id('id_your-message')
 
        submit = selenium.find_element_by_name('Send')
 
        # Fill the form with Sample data
        name.send_keys('<NAME>')
        email.send_keys('<EMAIL>')
        message.send_keys('Test message for sample test.')
 
        # Submitting the form
        submit.send_keys(Keys.RETURN)
 
        # Check the returned result
        assert 'Thanks for you interest' in selenium.page_source
{'fraction_non_alphanumeric': 0.09641669745105283, 'fraction_numerical': 0.007388252678241596, 'mean_word_length': 3.0783132530120483, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6021710', 'n_tokens_mistral': 855, 'n_tokens_neox': 772, 'n_words': 167}