Exemple #1
0
 def test_unexpected_format(self):
     time_string = '1MPT'
     time = time_in_minutes(time_string)
     self.assertEqual(time, 0)
Exemple #2
0
 def test_all_zero(self):
     time_string = '0000'
     time = time_in_minutes(time_string)
     self.assertEqual(time, 0)
Exemple #3
0
 def test_no_hour_string(self):
     time_string = 'PT54M'
     time = time_in_minutes(time_string)
     self.assertEqual(time, 54)
Exemple #4
0
 def test_no_minute_string(self):
     time_string = 'PT5HS'
     time = time_in_minutes(time_string)
     self.assertEqual(time, 300)
Exemple #5
0
 def test_empty_string(self):
     time_string = ''
     time = time_in_minutes(time_string)
     self.assertEqual(time, 0)