def testForIneligibleBirthDate(self, mock_func): """Tests that an error is raised for an ineligible birth date.""" program = program_utils.seedGSoCProgram() with self.assertRaises(django_forms.ValidationError): profile_view.cleanBirthDate(TEST_BIRTH_DATE, program)
def testForEligibleBirthDate(self, mock_func): """Tests that an eligible birth date is cleaned properly.""" program = program_utils.seedGSoCProgram() result = profile_view.cleanBirthDate(TEST_BIRTH_DATE, program) self.assertEqual(result, TEST_BIRTH_DATE)