update tests

This commit is contained in:
darksidecat 2021-10-05 23:40:53 +03:00 committed by GitHub
parent 5ac4048c31
commit ce8bedb978
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ class TestRequestLogging:
bot.add_result_for(GetMe, ok=True, result=User(id=42, is_bot=True, first_name="Test"))
assert await bot.get_me()
assert "Make request with method=GetMe by bot id=42" in caplog.text
assert "Make request with method='GetMe' by bot id=42" in caplog.text
async def test_ignore_methods(self, bot: MockedBot, caplog):
caplog.set_level(logging.INFO)
@ -26,7 +26,7 @@ class TestRequestLogging:
bot.add_result_for(GetMe, ok=True, result=User(id=42, is_bot=True, first_name="Test"))
assert await bot.get_me()
assert "Make request with method=GetMe by bot id=42" not in caplog.text
assert "Make request with method='GetMe' by bot id=42" not in caplog.text
bot.add_result_for(
SendMessage,
@ -39,4 +39,4 @@ class TestRequestLogging:
),
)
assert await bot.send_message(chat_id=1, text="Test")
assert "Make request with method=SendMessage by bot id=42" in caplog.text
assert "Make request with method='SendMessage' by bot id=42" in caplog.text