Exemple #1
0
 def test_hours(self):
     self.assertEquals("01:00:00", duration('3600'))
     self.assertEquals("01:00:02", duration('3602'))
     self.assertEquals("02:00:00", duration('7200'))
     self.assertEquals("02:02:00", duration('7320'))
     self.assertEquals("02:02:01", duration('7321'))
     self.assertEquals("02:02:02", duration('7322'))
Exemple #2
0
 def test_hours(self):
     self.assertEquals("01:00:00", duration('3600'))
     self.assertEquals("01:00:02", duration('3602'))
     self.assertEquals("02:00:00", duration('7200'))
     self.assertEquals("02:02:00", duration('7320'))
     self.assertEquals("02:02:01", duration('7321'))
     self.assertEquals("02:02:02", duration('7322'))
Exemple #3
0
 def test_seconds(self):
     self.assertEquals("00:15", duration('15'))
     self.assertEquals("00:01", duration('1'))
Exemple #4
0
 def test_bad(self):
     self.assertEquals('', duration(None))
Exemple #5
0
 def test_minutes(self):
     self.assertEquals("01:01", duration('61'))
     self.assertEquals("01:00", duration('60'))
     self.assertEquals("02:00", duration('120'))
Exemple #6
0
 def test_minutes(self):
     self.assertEquals("01:01", duration('61'))
     self.assertEquals("01:00", duration('60'))
     self.assertEquals("02:00", duration('120'))
Exemple #7
0
 def test_seconds(self):
     self.assertEquals("00:15", duration('15'))
     self.assertEquals("00:01", duration('1'))
Exemple #8
0
 def test_bad(self):
     self.assertEquals('', duration(None))