diff --git a/tests/dummy_domain/routers/async/__init__.py b/tests/dummy_domain/routers/async_router/__init__.py similarity index 100% rename from tests/dummy_domain/routers/async/__init__.py rename to tests/dummy_domain/routers/async_router/__init__.py diff --git a/tests/test_dummy_domain.py b/tests/test_dummy_domain.py index 56da1b1..8c9b757 100644 --- a/tests/test_dummy_domain.py +++ b/tests/test_dummy_domain.py @@ -13,7 +13,6 @@ def test_dummy_domain(): from .dummy_domain.routers.abc.alphabet.TEST_uuid import get from .dummy_domain.routers.abc.pinnochio import get from .dummy_domain.routers.config import get - async_mod = importlib.import_module('dummy_domain.routers.async', '.') - fcts = ['get_abc_alphabet_TEST', 'get_abc_pinnochio', 'get_config', 'get_arguments'] - for fct in fcts: - getattr(async_mod, fct) + from .dummy_domain.routers.config import get + from .dummy_domain.routers import async_router + from .dummy_domain.routers.async_router import ROUTES, get_abc_alphabet_TEST, get_abc_pinnochio, get_config, get_arguments diff --git a/tests/test_dummy_project_router.py b/tests/test_dummy_project_router.py index b99a1d4..ff47c30 100644 --- a/tests/test_dummy_project_router.py +++ b/tests/test_dummy_project_router.py @@ -24,8 +24,8 @@ def test_get_route(dummy_project, application_domain): dummy_domain_routes = [ ('config','GET'), ('config','GET'), - ('async/abc/pinnochio','GET'), - ('async/config','GET'), + ('async_router/abc/pinnochio','GET'), + ('async_router/config','GET'), # ('abc/pinnochio','GET'), # ('abc/alphabet','GET'), ] @@ -95,7 +95,7 @@ def test_arguments_route(dummy_project, application_domain): assert r.status_code == 200 for key, val in arg.items(): assert r.json()[key] == str(val) - path = '/async/arguments' + path = '/async_router/arguments' r = c.get(path) assert r.status_code == 400 r = c.get(path, params={'foo':True})