From a18a9f1a25fad4370af7ff544df14f6633db8d89 Mon Sep 17 00:00:00 2001
From: Sebastian Lobinger <sebastian.lobinger@fu-berlin.de>
Date: Thu, 22 Jun 2017 08:16:29 +0200
Subject: [PATCH] modified test_hub_provides_apps_with_proxies to reflect issue
 #29

---
 test/test_sams_hub.py | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/test/test_sams_hub.py b/test/test_sams_hub.py
index ac6b12f..673b533 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):
   
-- 
GitLab