Exemplo n.º 1
0
 def test_validate_date_succeeds_with_valid_date_without_separators(self):
     date_string = '19990101'
     validate_date(date_string)
Exemplo n.º 2
0
 def test_validate_date_error_explains_itself(self):
     date_string = '1999:01:01'
     try:
         validate_date(date_string)
     except VCardValueError as error:
         self.assertIn('Invalid date', str(error))
Exemplo n.º 3
0
 def test_validate_date_error_contains_date(self):
     date_string = '1999:01:01'
     try:
         validate_date(date_string)
     except VCardValueError as error:
         self.assertIn(date_string, str(error))
Exemplo n.º 4
0
 def test_validate_date_succeeds_with_leap_day(self):
     date_string = '2008-02-29'
     validate_date(date_string)
Exemplo n.º 5
0
 def test_validate_date_succeeds_with_leap_day_in_year_divisible_by_four_hundred(self):
     date_string = '2000-02-29'
     validate_date(date_string)
Exemplo n.º 6
0
 def test_validate_date_succeeds_with_valid_date_without_separators(self):
     date_string = '19990101'
     validate_date(date_string)
Exemplo n.º 7
0
 def test_validate_date_error_contains_date(self):
     date_string = '1999:01:01'
     try:
         validate_date(date_string)
     except VCardValueError as error:
         self.assertIn(date_string, str(error))
Exemplo n.º 8
0
 def test_validate_date_error_explains_itself(self):
     date_string = '1999:01:01'
     try:
         validate_date(date_string)
     except VCardValueError as error:
         self.assertIn('Invalid date', str(error))
Exemplo n.º 9
0
 def test_validate_date_succeeds_with_leap_day_in_year_divisible_by_four_hundred(
         self):
     date_string = '2000-02-29'
     validate_date(date_string)
Exemplo n.º 10
0
 def test_validate_date_succeeds_with_leap_day(self):
     date_string = '2008-02-29'
     validate_date(date_string)