diff --git a/test/test_actionsmap.py b/test/test_actionsmap.py index 4d9befe0..0abdd7f4 100644 --- a/test/test_actionsmap.py +++ b/test/test_actionsmap.py @@ -244,20 +244,6 @@ def test_actions_map_api(): assert parser.auth_method(None, ("GET", "/test-auth/only-api")) == "dummy" assert parser.auth_method(None, ("GET", "/test-auth/only-cli")) is None - amap.generate_cache("moulitest") - - parser = ActionsMapParser() - amap = ActionsMap(parser) - - assert amap.main_namespace == "moulitest" - assert amap.default_authentication == "dummy" - assert ("GET", "/test-auth/default") in amap.parser.routes - assert ("POST", "/test-auth/subcat/post") in amap.parser.routes - - assert parser.auth_method(None, ("GET", "/test-auth/default")) == "dummy" - assert parser.auth_method(None, ("GET", "/test-auth/only-api")) == "dummy" - assert parser.auth_method(None, ("GET", "/test-auth/only-cli")) is None - def test_actions_map_import_error(mocker): from moulinette.interfaces.api import ActionsMapParser @@ -320,26 +306,3 @@ def test_actions_map_cli(): assert parser.auth_method(["testauth", "default"]) == "dummy" assert parser.auth_method(["testauth", "only-api"]) is None assert parser.auth_method(["testauth", "only-cli"]) == "dummy" - - amap.generate_cache("moulitest") - - parser = ActionsMapParser(top_parser=top_parser) - amap = ActionsMap(parser) - - assert amap.main_namespace == "moulitest" - assert amap.default_authentication == "dummy" - assert "testauth" in amap.parser._subparsers.choices - assert "none" in amap.parser._subparsers.choices["testauth"]._actions[1].choices - assert "subcat" in amap.parser._subparsers.choices["testauth"]._actions[1].choices - assert ( - "default" - in amap.parser._subparsers.choices["testauth"] - ._actions[1] - .choices["subcat"] - ._actions[1] - .choices - ) - - assert parser.auth_method(["testauth", "default"]) == "dummy" - assert parser.auth_method(["testauth", "only-api"]) is None - assert parser.auth_method(["testauth", "only-cli"]) == "dummy" diff --git a/test/test_cache.py b/test/test_cache.py deleted file mode 100644 index e0f5c568..00000000 --- a/test/test_cache.py +++ /dev/null @@ -1,12 +0,0 @@ -import os.path - - -def test_open_cachefile_creates(monkeypatch, tmp_path): - monkeypatch.setenv("MOULINETTE_CACHE_DIR", str(tmp_path)) - - from moulinette.cache import open_cachefile - - handle = open_cachefile("foo.cache", mode="w") - - assert handle.mode == "w" - assert handle.name == os.path.join(str(tmp_path), "foo.cache")