From f1e58d72854d80ab71c39577888423e34dbaff72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 23 May 2016 15:21:56 +0200 Subject: [PATCH] Fixed unittest --- tests/test_auth.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_auth.py b/tests/test_auth.py index a2195c9f..164b4fe7 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -466,10 +466,12 @@ class PermissionComputationTest(AbstractPillarTest): }, self.sort(compute_aggr_permissions('projects', EXAMPLE_PROJECT, 'texture'))) + with self.app.test_request_context(): # Test node permissions with non-existing project. node = copy.deepcopy(EXAMPLE_NODE) self.assertRaises(Forbidden, compute_aggr_permissions, 'nodes', node, None) + with self.app.test_request_context(): # Test node permissions without embedded project. self.ensure_project_exists() self.assertEqual( @@ -482,6 +484,7 @@ class PermissionComputationTest(AbstractPillarTest): u'world': [u'GET']}, self.sort(compute_aggr_permissions('nodes', node, None))) + with self.app.test_request_context(): # Test node permissions with embedded project. node = copy.deepcopy(EXAMPLE_NODE) node['project'] = EXAMPLE_PROJECT