Beispiel #1
0
 def test_validate_valid_time_range(self):
     accepted = True
     today = datetime.datetime.now().strftime("%Y-%m-%d")
     try:
         validate.validate_time_range(today)
     except ValueError as e:
         accepted = False
     assert accepted
Beispiel #2
0
 def test_validate_invalid_time_range(self):
     accepted = False
     today = datetime.datetime.now()
     date = (today - datetime.timedelta(days=90)).strftime("%Y-%m-%d")
     try:
         validate.validate_time_range(date)
     except ValueError as e:
         accepted = True
     assert accepted