Implement temporary workaround from unasync package

This commit is contained in:
Serhii Charykov 2022-05-01 18:15:50 +03:00
parent 490fcec1a7
commit 85540c02bd
5 changed files with 73 additions and 96 deletions

View file

@ -9,6 +9,14 @@ from aredis_om import get_redis_connection
TEST_PREFIX = "redis-om:testing"
py_test_mark_asyncio = pytest.mark.asyncio
# "pytest_mark_sync" causes problem in pytest
def py_test_mark_sync(f):
return f # no-op decorator
@pytest.fixture(scope="session")
def event_loop(request):
loop = asyncio.get_event_loop_policy().new_event_loop()