diff --git a/test/test_sams_hub.py b/test/test_sams_hub.py index ac6b12f0bfaaea09d7c2074035ab20326200fc45..673b5338b0e35413b8d2922cc555f74e83386572 100644 --- a/test/test_sams_hub.py +++ b/test/test_sams_hub.py @@ -33,12 +33,14 @@ class CaseSAMSHubWithThreadedAPI(unittest.TestCase): self.hub.addApp( SAMSApp(name = 'test',manifest = manifest, langDict={'de':{}}) ) - self.hub.addApp( - SAMSApp(name = 'test.app', manifest = manifest, langDict={'de':{}}) - ) + testApp = SAMSApp(name = 'test.app', manifest = manifest, langDict={'de':{}}) + self.hub.addApp(app = testApp) + self.hub.addApp(app = testApp, alias = 'test') with self.hub.flaskApp.test_client() as client: - self.assertIs(client.get(path='/api/hello').status_code, 200) - self.assertIs(client.get(path='/test.app/api/hello').status_code, 200) + for urlPrefix in ('', '/test.app', '/test'): + with self.subTest(urlPrefix): + self.assertIs(client.get( + path = urlPrefix + '/api/hello').status_code, 200) class CaseSAMSHubWithMainApp(unittest.TestCase):