Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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)
Beispiel #4
0
 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)