aiogram/aiogram/filters
Rishat-F 1df3adaba1
Fail redis and mongo tests if incorrect URI provided + some storages tests refactoring (#1510)
* Smaller timeout for MongoStorage connection

By default serverSelectionTimeoutMS=30000. This is too much

* Correct ConnectionError for RedisStorage in tests

* Remove unused import in conftest.py

* Refactor skipping redis and mongo tests

* Fail redis and mongo tests if incorrect URI

If incorrect URIs provided to "--redis" and/or "--mongo" options
tests should fail with ERRORs instead of skipping.
Otherwise the next scenario is possible:
  1) developer breaks RedisStorage and/or MongoStorage code
  2) tests are run with incorrect redis and/or mongo URIs
     provided by "--redis" and "--mongo" options.
     For example, wrong port specified.
  3) tests pass because skipping doesn't fail tests run
  4) developer or reviewer doesn't notice
     that redis and/or mongo tests were skipped
  5) broken code gets in codebase

* Remove unused fixtures passing in storages tests

* Define create_storage_key fixture in conftest.py

* Linters formatting

* Changes description

* Revert "Smaller timeout for MongoStorage connection"

This reverts commit d88b7ec612.

* Smaller timeout for MongoStorage connection in tests

The default 30s timeout is too long

* Add test for MongoStorage for 100% coverage

* Linters formatting

* Move skipping redis/mongo tests in earlier fixtures

* Replace vars with constants in conftest.py

* Linters formatting
2024-06-17 00:55:59 +03:00
..
__init__.py Removed Text filter (#1170) 2023-04-22 20:21:17 +03:00
base.py Migrate to hatchling (#1095) 2023-01-12 02:49:58 +02:00
callback_data.py #1370 added possibility to check X | None on Python >= 3.10 2023-11-20 22:49:55 +02:00
chat_member_updated.py Fixed subtypes and union types generation, new enums added (#1213) 2023-07-11 23:39:54 +03:00
command.py Fail redis and mongo tests if incorrect URI provided + some storages tests refactoring (#1510) 2024-06-17 00:55:59 +03:00
exception.py Combining filters (again) (#1018) 2022-10-03 01:23:22 +03:00
logic.py Extended logic filter arguments 2023-02-04 20:14:15 +02:00
magic_data.py #1485 Fixed slots on MagicData filter 2024-05-11 01:57:16 +03:00
state.py Removed the use of the context instance (Bot.get_current) from all placements that were used previously. (#1230) 2023-07-28 22:23:32 +03:00