aiogram_tests
aiogram_tests copied to clipboard
The library for testing bots on aiogram3
Just copied 2 peaces of code from `README.md` in 2 files: `bot.py` and `test.py`. Full traceback: ```python test.py::test_echo FAILED [100%] test.py:9 (test_echo) @pytest.mark.asyncio async def test_echo(): request = MockedBot(MessageHandler(echo)) >...
I can't even run the basic example even though version aiogram==3.0.0b7. Tell me please, what could be the problem? All code and error is attached below. @router.message(Command(commands=["start"])) async def command_handler(message:...
Broke after aiogram commit 3ea73fbbbdfd5dd5c71e9b19e39cbd1ff99b500d `import pytest from aiogram_tests import MockedBot from aiogram_tests.handler import MessageHandler from aiogram_tests.types.dataset import BOT_COMMAND from denis_hodge_podge_bot.handlers.start import start @pytest.mark.asyncio async def test_start(): requester = MockedBot(MessageHandler(start))...
- With this [PR](https://github.com/OCCCAS/aiogram_tests/pull/11#issuecomment-1585652014) was implemented `auto_mock_success` flag. `False` default value break tests in `./examples/example_tests.py`. Example from `README.md` [are not working](https://github.com/OCCCAS/aiogram_tests/issues/16) - Changed version number to `1.0.4` - Fixed typo...
Hello and thank you for the library. In your examples, the handler is predefined each time. How can I just create an update and check if it hits the right...
Since all related test should be async, it would be nice add global async support pyproject.toml example: ```toml [tool.pytest.ini_options] asyncio_mode = "auto" ```