chore: update development dependencies and improve test coverage
Some checks failed
CI / lint-and-test (push) Failing after 11s
Some checks failed
CI / lint-and-test (push) Failing after 11s
- Upgraded `pytest-asyncio` to version 1.0 to ensure compatibility with the latest features and improvements. - Increased the coverage threshold in pytest configuration to 80%, enhancing the quality assurance process. - Added a new `conftest.py` file to manage shared fixtures and improve test organization. - Introduced multiple new test files to cover various components, ensuring comprehensive test coverage across the application. - Updated the `.coverage` file to reflect the latest coverage metrics.
This commit is contained in:
13
tests/test_handlers_init.py
Normal file
13
tests/test_handlers_init.py
Normal file
@@ -0,0 +1,13 @@
|
||||
"""Tests for duty_teller.handlers.register_handlers."""
|
||||
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from duty_teller.handlers import register_handlers
|
||||
|
||||
|
||||
def test_register_handlers_adds_all_handlers():
|
||||
"""register_handlers: adds command, import, group pin handlers and error handler."""
|
||||
mock_app = MagicMock()
|
||||
register_handlers(mock_app)
|
||||
assert mock_app.add_handler.call_count >= 9
|
||||
assert mock_app.add_error_handler.call_count == 1
|
||||
Reference in New Issue
Block a user