MCPcopy Create free account
hub / github.com/dataabc/weiboSpider / test_index_parser

Function test_index_parser

tests/test_parser/test_index_parser.py:8–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7@patch('requests.get', mock_request_get_content)
8def test_index_parser():
9 index_parser = IndexParser(cookie="", user_uri="1669879400")
10 assert (index_parser.get_page_num() == 117)
11 assert (str(index_parser.get_user()) == """用户昵称: Dear-迪丽热巴\n"""
12 """用户id: 1669879400\n"""
13 """微博数: 1159\n"""
14 """关注数: 253\n"""
15 """粉丝数: 70805574\n""")

Callers

nothing calls this directly

Calls 3

get_page_numMethod · 0.95
get_userMethod · 0.95
IndexParserClass · 0.90

Tested by

no test coverage detected