|
@@ -44,6 +44,10 @@ class TestSource(unittest.TestCase): |
|
|
source = utils.Source(self.source, self.path, self.provider) |
|
|
source = utils.Source(self.source, self.path, self.provider) |
|
|
self.assertEqual(source.duration(), self._duration) |
|
|
self.assertEqual(source.duration(), self._duration) |
|
|
|
|
|
|
|
|
|
|
|
def test_to_json(self): |
|
|
|
|
|
source = utils.Source(self.source, self.path, self.provider) |
|
|
|
|
|
self.assertEqual(source.to_json(), {"source": self.source, "path": self.path, "provider": self.provider}) |
|
|
|
|
|
|
|
|
# Sad path tests |
|
|
# Sad path tests |
|
|
def test_init_no_source(self): |
|
|
def test_init_no_source(self): |
|
|
with self.assertRaises(ValueError): |
|
|
with self.assertRaises(ValueError): |
|
|