[test_utils] Add more tests for parse_duration
authorSergey M․ <dstftw@gmail.com>
Mon, 12 Jan 2015 15:39:58 +0000 (21:39 +0600)
committerSergey M․ <dstftw@gmail.com>
Mon, 12 Jan 2015 15:39:58 +0000 (21:39 +0600)
test/test_utils.py

index 5e16f30a2d2a08220909b04228d97683be486061..399cdfdbd4baddf09866be9972f5ef36d2cf67cc 100644 (file)
@@ -212,6 +212,8 @@ class TestUtil(unittest.TestCase):
 
     def test_parse_duration(self):
         self.assertEqual(parse_duration(None), None)
+        self.assertEqual(parse_duration(False), None)
+        self.assertEqual(parse_duration('invalid'), None)
         self.assertEqual(parse_duration('1'), 1)
         self.assertEqual(parse_duration('1337:12'), 80232)
         self.assertEqual(parse_duration('9:12:43'), 33163)