From 0217cc92bcb04b4e3dd2c0f2b37e0d6f8653ef3a Mon Sep 17 00:00:00 2001
From: Sebastian Lobinger <sebastian.lobinger@fu-berlin.de>
Date: Wed, 14 Jun 2017 14:21:21 +0200
Subject: [PATCH] extend test_main_app in test_sams_hub.py according to issue
 #24

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

diff --git a/test/test_sams_hub.py b/test/test_sams_hub.py
index 987e394..35d50c8 100644
--- a/test/test_sams_hub.py
+++ b/test/test_sams_hub.py
@@ -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):
 
-- 
GitLab