From 4cfb2d4827156cd4dd64a09ada3214415a8a7fdd Mon Sep 17 00:00:00 2001 From: vrvarma Date: Tue, 9 Apr 2019 09:31:42 -0400 Subject: Reduce AAF auth permission cache time to 5 mins Refactor code smell issues found in sonar Change-Id: I819a91e374609224561afa7ddb6878fab37feaf2 Signed-off-by: vrvarma Issue-ID: OPTFRA-471 --- test/test_aaf_authentication.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/test_aaf_authentication.py') diff --git a/test/test_aaf_authentication.py b/test/test_aaf_authentication.py index f20a860..e69b2aa 100644 --- a/test/test_aaf_authentication.py +++ b/test/test_aaf_authentication.py @@ -16,6 +16,7 @@ # ------------------------------------------------------------------------- # import os + from flask import Flask from mock import mock @@ -33,7 +34,7 @@ class TestAafAuthentication(): def mock_aaf_response(*args, **kwargs): return {"perm": [{"instance": "menu_ecd", "action": "*", "type": "org.onap.oof.controller.dev.menu"}, - {"instance": "*", "action": "*", "type": "org.onap.osdf.access"}, + {"instance": "*", "action": "read", "type": "org.onap.osdf.access"}, {"instance": "aaf", "action": "request", "type": "org.onap.osdf.certman"}, {"instance": "*", "action": "*", "type": "org.onap.osdf.dev.access"}, {"instance": ":*:*", "action": "*", "type": "org.onap.osdf.dev.k8"}, @@ -48,8 +49,8 @@ class TestAafAuthentication(): auth.clear_cache() def mock_aaf_response(*args, **kwargs): - return {"perm": [{"instance": "menu_ecd", "action": "*", "type": "org.onap.oof.controller.dev.menu"}, - {"instance": "*", "action": "*", "type": "org.onap.osdf.access"}, + return {"perm": [{"instance": "menu_ecd", "action": "*", "type": "org.onap.osdf.controller.dev.menu"}, + {"instance": "*", "action": "read", "type": "org.onap.osdf.access"}, {"instance": "aaf", "action": "request", "type": "org.onap.osdf.certman"}, {"instance": "*", "action": "*", "type": "org.onap.osdf.dev.access"}, {"instance": ":*:*", "action": "*", "type": "org.onap.osdf.dev.k8"}, -- cgit 1.2.3-korg