コード例 #1
0
ファイル: test_profile.py プロジェクト: rhyolight/nupic.son
 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)
コード例 #2
0
ファイル: test_profile.py プロジェクト: rhyolight/nupic.son
 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)
コード例 #3
0
ファイル: test_profile.py プロジェクト: rhyolight/nupic.son
 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)
コード例 #4
0
ファイル: test_profile.py プロジェクト: rhyolight/nupic.son
 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)