fix bugs
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
import unittest
|
||||
|
||||
from tests.test_metainfo import MetaInfoTest
|
||||
from tests.test_recognize import RecognizeTest
|
||||
|
||||
if __name__ == '__main__':
|
||||
suite = unittest.TestSuite()
|
||||
# 测试名称识别
|
||||
suite.addTest(MetaInfoTest('test_metainfo'))
|
||||
|
||||
# 测试媒体识别
|
||||
suite.addTest(RecognizeTest('test_recognize'))
|
||||
# 运行测试
|
||||
runner = unittest.TextTestRunner()
|
||||
runner.run(suite)
|
||||
|
17
tests/test_recognize.py
Normal file
17
tests/test_recognize.py
Normal file
@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from unittest import TestCase
|
||||
|
||||
from app.chain.identify import IdentifyChain
|
||||
|
||||
|
||||
class RecognizeTest(TestCase):
|
||||
def setUp(self) -> None:
|
||||
pass
|
||||
|
||||
def tearDown(self) -> None:
|
||||
pass
|
||||
|
||||
def test_recognize(self):
|
||||
result = IdentifyChain().process(title="我和我的祖国 2019")
|
||||
self.assertEqual(str(result.media_info.tmdb_id), '612845')
|
Reference in New Issue
Block a user