Пример #1
0
 def test_looks_like_duration_but_isnt_returns_none(self):
     self.assertEquals(duration_to_seconds("01:02m"), None)
Пример #2
0
 def test_three_part_duration(self):
     self.assertEquals(duration_to_seconds("01:02:03"), 3723)
Пример #3
0
 def test_two_part_duration(self):
     self.assertEquals(duration_to_seconds("01:02"), 62)
Пример #4
0
 def test_no_duration_returns_none(self):
     self.assertEquals(duration_to_seconds("something"), None)
Пример #5
0
 def duration_to_seconds(self):
     """
     :return: duration in seconds
     """
     return formatting.duration_to_seconds(self.duration)