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"
...@@ -100,13 +100,16 @@ class CaseSAMSHubWithMainApp(unittest.TestCase): ...@@ -100,13 +100,16 @@ class CaseSAMSHubWithMainApp(unittest.TestCase):
) )
hub.flaskApp.config['DEBUG'] = True hub.flaskApp.config['DEBUG'] = True
with hub.flaskApp.test_client(self) as client: with hub.flaskApp.test_client(self) as client:
response = client.get('/') for path in ('/', '/' + main_app + '/'):
self.assertIs(response.status_code, 200) with self.subTest('check rootpath with content for ' + path):
self.assertEquals(response.data.decode('utf-8'), expected) response = client.get(path)
response = client.get('/' + urls[1]) self.assertIs(response.status_code, 200)
self.assertIs(response.status_code, 200) self.assertEquals(response.data.decode('utf-8'), expected)
response = client.get('/' + extra_app + '/' + urls[2]) for path in ('/' + urls[1], '/' + main_app + '/' + urls[1],
self.assertIs(response.status_code, 200) '/' + 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): 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