Merge BaseBot to Bot class

This commit is contained in:
Boger 2020-03-25 15:35:32 +03:00
parent fac69e52b7
commit a823e275a7
6 changed files with 111 additions and 120 deletions

View file

@ -23,7 +23,6 @@ class TestBaseClassBasedHandler:
assert handler.event == event
assert handler.data["key"] == 42
assert hasattr(handler, "bot")
assert not hasattr(handler, "filters")
assert await handler == 42
@ -33,7 +32,8 @@ class TestBaseClassBasedHandler:
handler = MyHandler(event=event, key=42)
bot = Bot("42:TEST")
assert handler.bot is None
with pytest.raises(LookupError):
handler.bot
Bot.set_current(bot)
assert handler.bot == bot