人人视频

This commit is contained in:
Harold
2026-04-20 13:47:56 +08:00
parent d9aef8c754
commit 196a544d93
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -34,6 +34,11 @@ class TestMoFangAppSpider(unittest.TestCase):
def test_replace_code_normalizes_common_ocr_misreads(self):
self.assertEqual(self.spider._replace_code("5y6口"), "5960")
@patch.object(Spider, "post")
def test_api_post_returns_none_when_upstream_payload_is_not_json(self, mock_post):
mock_post.return_value = SimpleNamespace(text="<html>blocked</html>")
self.assertIsNone(self.spider._api_post("initV119"))
@patch.object(Spider, "_api_post")
def test_home_content_filters_categories_merges_area_and_inserts_current_year(self, mock_api_post):
mock_api_post.return_value = {