From 776cc8c85eaeb17a9e89a92c5c8016cc4a101cfd Mon Sep 17 00:00:00 2001 From: "Maxime Alves LIRMM@home" Date: Tue, 14 Dec 2021 09:04:06 +0100 Subject: [PATCH] [testing] fix check_routes of test_domain --- halfapi/testing/test_domain.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/halfapi/testing/test_domain.py b/halfapi/testing/test_domain.py index fba5d1f..2f26e4a 100644 --- a/halfapi/testing/test_domain.py +++ b/halfapi/testing/test_domain.py @@ -66,19 +66,21 @@ class TestDomain(TestCase): return result_d def check_routes(self): - halfapi = HalfAPI({ - 'domain': { - 'dummy_domain': { - 'name': self.DOMAIN, - 'router': self.ROUTERS, - 'prefix': False, - 'enabled': True, - 'config': { - 'test': True - } - } + halfapi_conf = { + 'domain': {} + } + + halfapi_conf['domain'][self.DOMAIN] = { + 'name': self.DOMAIN, + 'router': self.ROUTERS, + 'prefix': False, + 'enabled': True, + 'config': { + 'test': True } - }) + } + + halfapi = HalfAPI(halfapi_conf) client = TestClient(halfapi.application) r = client.get('/')