Example #1
0
    def test_date_of_birth_high_range(self):

        validation = FormValidation()

        date_string = date.today() + timedelta(days=1)

        self.assertFalse(validation.date_of_birth(date_string.strftime('%d/%m/%Y')))
Example #2
0
    def test_name_invalid(self):

        validation = FormValidation()

        self.assertFalse(validation.name('James!!'))
Example #3
0
    def test_name_filled_four(self):

        validation = FormValidation()

        self.assertTrue(validation.name('James-Christopher 3'))
Example #4
0
    def test_name_filled_two(self):

        validation = FormValidation()

        self.assertTrue(validation.name('James Christopher'))
Example #5
0
    def test_email_invalid_three(self):

        validation = FormValidation()

        self.assertFalse(validation.email('jessica@out look.com'))
Example #6
0
    def test_email_filled_two(self):

        validation = FormValidation()

        self.assertTrue(validation.email('*****@*****.**'))
Example #7
0
    def test_email_fail(self):

        validation = FormValidation()

        self.assertFalse(validation.email(''))
Example #8
0
    def test_last_name_filled_four(self):

        validation = FormValidation()

        self.assertTrue(validation.name('Johnson 3rd'))
Example #9
0
    def test_date_of_birth_low_range(self):

        validation = FormValidation()

        self.assertFalse(validation.date_of_birth('31/12/1899'))
Example #10
0
    def test_date_of_birth_invalid_three(self):

        validation = FormValidation()

        self.assertFalse(validation.date_of_birth('24/5/1995'))
Example #11
0
    def test_date_of_birth_invalid_two(self):

        validation = FormValidation()

        self.assertFalse(validation.date_of_birth('24-5-1995'))
Example #12
0
    def test_date_of_birth_invalid(self):

        validation = FormValidation()

        self.assertFalse(validation.date_of_birth('1995/05/24'))
Example #13
0
    def test_date_of_birth(self):

        validation = FormValidation()

        self.assertTrue(validation.date_of_birth('24/05/1995'))
Example #14
0
    def test_name_empty(self):

        validation = FormValidation()

        self.assertFalse(validation.name(''))
Example #15
0
    def test_form_validation(self):

        validation = FormValidation()

        self.assertIsInstance(validation, FormValidation)
Example #16
0
    def test_last_name_filled_three(self):

        validation = FormValidation()

        self.assertTrue(validation.name('Jo-Johnson'))
Example #17
0
    def test_terms_conditions(self):

        validation = FormValidation()

        self.assertTrue(validation.terms_conditions('on'))
Example #18
0
    def test_last_name_invalid(self):

        validation = FormValidation()

        self.assertFalse(validation.name('Johnson$'))
Example #19
0
    def test_terms_conditions_invalid(self):

        validation = FormValidation()

        self.assertFalse(validation.terms_conditions(''))
Example #20
0
    def test_email_filled(self):

        validation = FormValidation()

        self.assertTrue(validation.email('*****@*****.**'))
Example #21
0
    def test_name_filled(self):

        validation = FormValidation()

        self.assertTrue(validation.name('James'))
Example #22
0
    def test_email_filled_three(self):

        validation = FormValidation()

        self.assertTrue(validation.email('*****@*****.**'))
Example #23
0
    def test_email_invalid(self):

        validation = FormValidation()

        self.assertFalse(validation.email('jessica.smith.outlook.com'))