From 8be9715790e20a6be42f2e73a09de0242b0e6086 Mon Sep 17 00:00:00 2001 From: Felix Zumstein Date: Sun, 8 Dec 2024 22:45:08 +0100 Subject: [PATCH] fix function namespace if empty (#201) * fix function namespace if empty * fix tests --- app/templates/manifest.xml | 4 ++++ tests/test_router_manifest.py | 10 ++-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/templates/manifest.xml b/app/templates/manifest.xml index 0b0351de..d6aa3a20 100644 --- a/app/templates/manifest.xml +++ b/app/templates/manifest.xml @@ -46,7 +46,9 @@ + {% if settings.functions_namespace %} + {% endif %} @@ -125,7 +127,9 @@ + {% if settings.functions_namespace %} + {% endif %} diff --git a/tests/test_router_manifest.py b/tests/test_router_manifest.py index ec1c4c20..e63c025d 100644 --- a/tests/test_router_manifest.py +++ b/tests/test_router_manifest.py @@ -28,17 +28,11 @@ def test_get_manifest_prod(mocker): ) -def test_empty_function_namespace_prod(mocker): +def test_empty_function_namespace(mocker): mocker.patch.object(settings, "environment", "prod") mocker.patch.object(settings, "functions_namespace", "") response = client.get(f"{settings.app_path}/manifest") - assert '' in response.text - - -def test_empty_function_namespace_nonprod(mocker): - mocker.patch.object(settings, "functions_namespace", "") - response = client.get(f"{settings.app_path}/manifest") - assert '' in response.text + assert "Functions.Namespace" not in response.text def test_entraid_auth_deactivated():