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

corrected misstakes in test_sams_app.py if url is '' and prefix is test

it musst be /test/
parent 7703aeef
Branches
Tags
1 merge request!15Resolve "Basis-Pfad (/) bei API über Proxy nicht aufrufbar"
......@@ -153,7 +153,7 @@ class TestSAMSApp(unittest.TestCase):
app = SAMSApp(name = 'test', manifest = manifest
, langDict = {'en': langDict})
menu = app.menu(langCode = 'en', urlPrefix = '/test')
self.assertEqual(menu[0]['url'], '/test')
self.assertEqual(menu[0]['url'], '/test/')
self.assertEqual(menu[1]['url'], '/test/1')
def test_app_menu_external_urls(self):
......@@ -168,7 +168,7 @@ class TestSAMSApp(unittest.TestCase):
app = SAMSApp(name = 'test', manifest = manifest
, langDict = {'en': langDict})
menu = app.menu(langCode = 'en', urlPrefix = '/test')
self.assertEqual(menu[0]['url'], '/test')
self.assertEqual(menu[0]['url'], '/test/')
self.assertEqual(menu[1]['url'], 'http://zib.de')
def test_app_proxies_list(self):
......@@ -218,7 +218,6 @@ class TestSAMSAppWithThreadedApi(unittest.TestCase):
)
self.flaskApp.register_blueprint(testApp.blueprint)
self.assertGreater(len(list(self.flaskApp.url_map.iter_rules())), 1)
eprint(self.flaskApp.url_map)
for path in ('/api/hello', '/api/'):
with self.subTest(path):
with self.flaskApp.test_client(self) as client:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment