伪造第二页的请求
(url, request)
| 260 | def test_iter_followers(self): |
| 261 | @urlmatch(netloc=r'(.*\.)?api\.weixin\.qq\.com$', query=r'.*next_openid=[^&]+') |
| 262 | def next_openid_mock(url, request): |
| 263 | """伪造第二页的请求""" |
| 264 | content = { |
| 265 | "total": 2, |
| 266 | "count": 0, |
| 267 | "next_openid": "" |
| 268 | } |
| 269 | headers = { |
| 270 | 'Content-Type': 'application/json' |
| 271 | } |
| 272 | return response(200, content, headers, request=request) |
| 273 | |
| 274 | with HTTMock(next_openid_mock, wechat_api_mock): |
| 275 | users = list(self.client.user.iter_followers()) |
nothing calls this directly
no test coverage detected