diff --git a/test/test_sams_proxy.py b/test/test_sams_proxy.py index a46d2d5411bbe300e2eb467c29bb126eb46402a7..a4a97bb2ddf82067764ac371e324a8f8cd9049dc 100644 --- a/test/test_sams_proxy.py +++ b/test/test_sams_proxy.py @@ -206,6 +206,7 @@ class TestSAMSHubWithThreadedAPI(unittest.TestCase): for param_type in ('header', 'url', 'body'): proxyApp = Flask('test') proxyApp.config['TESTING'] = True + proxyApp.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX/,?RT' proxy = SAMSProxy( proxySpec = { 'in': '/proxy', 'out': 'http://localhost:4711', @@ -223,6 +224,8 @@ class TestSAMSHubWithThreadedAPI(unittest.TestCase): view_func = proxy.proxy, methods=['GET', 'POST', 'PUT', 'UPDATE', 'PATCH', 'DELETE', 'OPTIONS']) with proxyApp.test_client(self) as client: + with client.session_transaction() as sess: + sess['user'] = 'foo' res = client.get(path='/proxy/passthrough', query_string={'u':'foo'}, data={'g':'bar'}, headers={'lang': 'klingon'})