Skip to content
Snippets Groups Projects
Commit d8ad72ef authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

delete unnessesary use of test_client in test:json_passthrough

parent 5113e889
No related branches found
No related tags found
1 merge request!3Resolve "SAMSApp fügt urlRules für SAMSProxies hinzu"
......@@ -187,11 +187,10 @@ class TestSAMSHub(unittest.TestCase):
thProxyApp = FlaskInThread(proxyApp, host="localhost", port=5000)
thProxyApp.start()
time.sleep(1)
with proxyApp.test_client(self) as client:
res = requests.post(url='http://localhost:5000/proxy/passthrough',
json={'g':'bar'})
resDict = json.loads(res.content.decode('utf-8'))
eprint('resDict: ' + str(resDict) + '\n')
self.assertEqual(resDict['body']['g'], 'bar')
res = requests.post(url='http://localhost:5000/proxy/passthrough',
json={'g':'bar'})
resDict = json.loads(res.content.decode('utf-8'))
eprint('resDict: ' + str(resDict) + '\n')
self.assertEqual(resDict['body']['g'], 'bar')
requests.get('http://localhost:5000/shutdown')
time.sleep(1)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment