diff options
author | WuKong <rebirthmonkey@gmail.com> | 2017-12-23 21:49:35 +0100 |
---|---|---|
committer | WuKong <rebirthmonkey@gmail.com> | 2017-12-23 21:49:58 +0100 |
commit | 1100c66ce03a059ebe7ece9734e799b49b3a5a9e (patch) | |
tree | a057e7e7511f6675a9327b79e6919f07c5f89f07 /moonv4/moon_interface/tests/unit_python/api | |
parent | 7a4dfdde6314476ae2a1a1c881ff1e3c430f790e (diff) |
moonv4 cleanup
Change-Id: Icef927f3236d985ac13ff7376f6ce6314b2b39b0
Signed-off-by: WuKong <rebirthmonkey@gmail.com>
Diffstat (limited to 'moonv4/moon_interface/tests/unit_python/api')
-rw-r--r-- | moonv4/moon_interface/tests/unit_python/api/__init__.py | 0 | ||||
-rw-r--r-- | moonv4/moon_interface/tests/unit_python/api/test_authz.py | 23 |
2 files changed, 0 insertions, 23 deletions
diff --git a/moonv4/moon_interface/tests/unit_python/api/__init__.py b/moonv4/moon_interface/tests/unit_python/api/__init__.py deleted file mode 100644 index e69de29b..00000000 --- a/moonv4/moon_interface/tests/unit_python/api/__init__.py +++ /dev/null diff --git a/moonv4/moon_interface/tests/unit_python/api/test_authz.py b/moonv4/moon_interface/tests/unit_python/api/test_authz.py deleted file mode 100644 index a63948f8..00000000 --- a/moonv4/moon_interface/tests/unit_python/api/test_authz.py +++ /dev/null @@ -1,23 +0,0 @@ -import json - - -def get_json(data): - return json.loads(data.decode("utf-8")) - - -def test_authz_true(context): - import moon_interface.server - server = moon_interface.server.main() - client = server.app.test_client() - req = client.get("/authz/{p_id}/{s_id}/{o_id}/{a_id}".format( - p_id=context["project_id"], - s_id=context["subject_name"], - o_id=context["object_name"], - a_id=context["action_name"], - )) - assert req.status_code == 200 - data = get_json(req.data) - assert data - assert "result" in data - assert data['result'] == True - |