Exemplo n.º 1
0
 def test_validate_frequency__negative_digit(self):
     duration = "1y -1d"
     with self.assertRaises(ValueError):
         reminder.validate_frequency(duration)
Exemplo n.º 2
0
 def test_validate_frequency__duplicate_duration_indicators(self):
     duration = "2y 5y"
     with self.assertRaises(ValueError):
         reminder.validate_frequency(duration)
Exemplo n.º 3
0
 def test_validate_frequency__zero_digit(self):
     duration = "0d"
     with self.assertRaises(ValueError):
         reminder.validate_frequency(duration)
Exemplo n.º 4
0
 def test_validate_frequency__missing_duration_type(self):
     duration = "3"
     with self.assertRaises(ValueError):
         reminder.validate_frequency(duration)
Exemplo n.º 5
0
 def test_validate_frequency__text_after(self):
     duration = "5d text after"
     with self.assertRaises(ValueError):
         reminder.validate_frequency(duration)
Exemplo n.º 6
0
 def test_validate_frequency__text_before(self):
     duration = "text before 3d"
     with self.assertRaises(ValueError):
         reminder.validate_frequency(duration)
Exemplo n.º 7
0
 def test_validate_frequency__empty(self):
     duration = ""
     with self.assertRaises(ValueError):
         reminder.validate_frequency(duration)