From 1100c66ce03a059ebe7ece9734e799b49b3a5a9e Mon Sep 17 00:00:00 2001 From: WuKong Date: Sat, 23 Dec 2017 21:49:35 +0100 Subject: moonv4 cleanup Change-Id: Icef927f3236d985ac13ff7376f6ce6314b2b39b0 Signed-off-by: WuKong --- .../moon_wrapper/tests/unit_python/api/__init__.py | 0 .../tests/unit_python/api/test_wrapper.py | 28 ---------------------- 2 files changed, 28 deletions(-) delete mode 100644 moonv4/moon_wrapper/tests/unit_python/api/__init__.py delete mode 100644 moonv4/moon_wrapper/tests/unit_python/api/test_wrapper.py (limited to 'moonv4/moon_wrapper/tests/unit_python/api') diff --git a/moonv4/moon_wrapper/tests/unit_python/api/__init__.py b/moonv4/moon_wrapper/tests/unit_python/api/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/moonv4/moon_wrapper/tests/unit_python/api/test_wrapper.py b/moonv4/moon_wrapper/tests/unit_python/api/test_wrapper.py deleted file mode 100644 index 7e9a7421..00000000 --- a/moonv4/moon_wrapper/tests/unit_python/api/test_wrapper.py +++ /dev/null @@ -1,28 +0,0 @@ -import json - - -def get_json(data): - return json.loads(data.decode("utf-8")) - - -def test_authz_true(context): - import moon_wrapper.server - server = moon_wrapper.server.main() - client = server.app.test_client() - _target = { - 'target': { - "name": context.get('object_name'), - }, - "project_id": context.get('project_id'), - "user_id": context.get('subject_name') - } - authz_data = { - 'rule': context.get('action_name'), - 'target': json.dumps(_target), - 'credentials': 'null'} - req = client.post("/authz", data=json.dumps(authz_data)) - assert req.status_code == 200 - assert req.data - assert isinstance(req.data, bytes) - assert req.data == b"True" - -- cgit 1.2.3-korg