소스 검색

test: [utils] add TestSource.test_to_json

main
Rob Hallam 2 달 전
부모
커밋
35d25c6ff2
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. +4
    -0
      test/test_utils.py

+ 4
- 0
test/test_utils.py 파일 보기

@@ -44,6 +44,10 @@ class TestSource(unittest.TestCase):
source = utils.Source(self.source, self.path, self.provider)
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
def test_init_no_source(self):
with self.assertRaises(ValueError):


불러오는 중...
취소
저장