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

extend test_main_app in test_sams_hub.py according to issue #24

parent 710a8459
No related branches found
No related tags found
1 merge request!17Resolve "main app sollte auch unter /appname/,,, ereichbar sein"
This commit is part of merge request !17. Comments created here will be created in the context of that merge request.
......@@ -100,13 +100,16 @@ class CaseSAMSHubWithMainApp(unittest.TestCase):
)
hub.flaskApp.config['DEBUG'] = True
with hub.flaskApp.test_client(self) as client:
response = client.get('/')
self.assertIs(response.status_code, 200)
self.assertEquals(response.data.decode('utf-8'), expected)
response = client.get('/' + urls[1])
self.assertIs(response.status_code, 200)
response = client.get('/' + extra_app + '/' + urls[2])
self.assertIs(response.status_code, 200)
for path in ('/', '/' + main_app + '/'):
with self.subTest('check rootpath with content for ' + path):
response = client.get(path)
self.assertIs(response.status_code, 200)
self.assertEquals(response.data.decode('utf-8'), expected)
for path in ('/' + urls[1], '/' + main_app + '/' + urls[1],
'/' + extra_app + '/' + urls[2]):
with self.subTest('check status_code for ' + path):
response = client.get(path)
self.assertIs(response.status_code, 200)
class CaseSAMSHubInitExceptions(unittest.TestCase):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment