Simplify Internals of Bot Methods (#3396)

This commit is contained in:
Harshil 2022-12-01 23:56:01 +05:30 committed by GitHub
parent 637cc574ab
commit 4123e7aa57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 277 additions and 481 deletions

File diff suppressed because it is too large Load diff

View file

@ -1910,8 +1910,8 @@ class TestBot:
self, bot, drop_pending_updates, monkeypatch
):
async def make_assertion(url, request_data: RequestData, *args, **kwargs):
data = request_data.json_parameters
return bool(data.get("drop_pending_updates")) == drop_pending_updates
data = request_data.parameters
return data.get("drop_pending_updates") == drop_pending_updates
monkeypatch.setattr(bot.request, "post", make_assertion)