mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
* initial commit * replacement by motor * Delete settings.json * fix: split to several files * feat: add test for deleted file Co-authored-by: morz <morzik45@gmail.com> Co-authored-by: morzik45 <46727779+morzik45@users.noreply.github.com>
15 lines
652 B
Python
15 lines
652 B
Python
import importlib
|
|
|
|
import aiogram
|
|
|
|
|
|
def test_file_deleted():
|
|
try:
|
|
major, minor, _ = aiogram.__version__.split(".")
|
|
except ValueError: # raised if version is major.minor
|
|
major, minor = aiogram.__version__.split(".")
|
|
if major == "2" and int(minor) >= 11:
|
|
mongo_aiomongo = importlib.util.find_spec("aiogram.contrib.fsm_storage.mongo_aiomongo")
|
|
assert mongo_aiomongo is False, "Remove aiogram.contrib.fsm_storage.mongo_aiomongo file, and replace storage " \
|
|
"in aiogram.contrib.fsm_storage.mongo with storage " \
|
|
"from aiogram.contrib.fsm_storage.mongo_motor"
|