From d023803536f069b4a69cfeeb744e56dfcd54103b Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Wed, 3 Jan 2018 14:13:11 +0100 Subject: Clean the code and fix some bugs Change-Id: I3516d001cb0792ca6b01a40b9d9d13efc3ba30f9 --- moon_authz/tests/unit_python/mock_pods.py | 8 ++++---- moon_authz/tests/unit_python/test_authz.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'moon_authz/tests/unit_python') diff --git a/moon_authz/tests/unit_python/mock_pods.py b/moon_authz/tests/unit_python/mock_pods.py index 7488f4f3..74801cd1 100644 --- a/moon_authz/tests/unit_python/mock_pods.py +++ b/moon_authz/tests/unit_python/mock_pods.py @@ -10,15 +10,15 @@ pdp_mock = { "keystone_project_id": "a64beb1cc224474fb4badd43173e7101" }, "pdp_id1": { - "name": "...", + "name": "pdp_id1", "security_pipeline": ["policy_id_1", "policy_id_2"], "keystone_project_id": "keystone_project_id1", "description": "...", }, "pdp_id12": { - "name": "...", + "name": "pdp_id2", "security_pipeline": ["policy_id_1", "policy_id_2"], - "keystone_project_id": "keystone_project_id1", + "keystone_project_id": "keystone_project_id2", "description": "...", } } @@ -100,7 +100,7 @@ subject_mock = { "policy_id_2": { "subject_id": { "name": "subject_name", - "keystone_id": "keystone_project_id1", + "keystone_id": "keystone_project_id2", "description": "a description" } } diff --git a/moon_authz/tests/unit_python/test_authz.py b/moon_authz/tests/unit_python/test_authz.py index f98abebc..50493c9f 100644 --- a/moon_authz/tests/unit_python/test_authz.py +++ b/moon_authz/tests/unit_python/test_authz.py @@ -12,9 +12,9 @@ def get_json(data): def test_authz_true(context): import moon_authz.server - from python_moonutilities.security_functions import Context + from python_moonutilities.context import Context from python_moonutilities.cache import Cache - server = moon_authz.server.main() + server = moon_authz.server.create_server() client = server.app.test_client() CACHE = Cache() CACHE.update() @@ -33,9 +33,9 @@ def test_authz_true(context): def test_user_not_allowed(context): import moon_authz.server - from python_moonutilities.security_functions import Context + from python_moonutilities.context import Context from python_moonutilities.cache import Cache - server = moon_authz.server.main() + server = moon_authz.server.create_server() client = server.app.test_client() CACHE = Cache() CACHE.update() -- cgit 1.2.3-korg