()
| 6 | |
| 7 | @patch('requests.get', mock_request_get_content) |
| 8 | def test_comment_parser(): |
| 9 | comment_parser = CommentParser(cookie="", weibo_id="J5cVGuUNq") |
| 10 | |
| 11 | long_weibo = comment_parser.get_long_weibo() |
| 12 | long_retweet = comment_parser.get_long_retweet() |
| 13 | |
| 14 | assert ( |
| 15 | long_retweet == """去年和亲善大使热巴@Dear-迪丽热巴 的特别回忆。""" |
| 16 | """我们在藏北羌塘一起爬山,探访藏羚羊、雪豹、黑颈鹤的栖息地,感受野生动物保护工作的点滴。""" |
| 17 | """此时此刻,我们比以往更加重视与自然相处的方式,我们也从未如此迫切需要将想法付诸行动。""" |
| 18 | """热巴已经和我们@北京绿色阳光 站在一起,希望看完视频的你们,也能获得同样感受与动力。\n""" |
| 19 | """We Stand for Wildlife. \n""" |
| 20 | """明日朝阳68309的优酷视频""") |
| 21 | assert ( |
| 22 | long_weibo == """去年和亲善大使热巴@Dear-迪丽热巴 的特别回忆。""" |
| 23 | """我们在藏北羌塘一起爬山,探访藏羚羊、雪豹、黑颈鹤的栖息地,感受野生动物保护工作的点滴。""" |
| 24 | """此时此刻,我们比以往更加重视与自然相处的方式,我们也从未如此迫切需要将想法付诸行动。""" |
| 25 | """热巴已经和我们@北京绿色阳光 站在一起,希望看完视频的你们,也能获得同样感受与动力。\n""" |
| 26 | """We Stand for Wildlife. \n""" |
| 27 | """明日朝阳68309的优酷视频""") |
nothing calls this directly
no test coverage detected