From c93f5ea09d03d19217138208f8425a63fcf0a1f5 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Mon, 22 Jan 2024 13:12:18 +0000 Subject: [PATCH] test: Patch environment to increase test stability --- api/tests/common/test_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/tests/common/test_commands.py b/api/tests/common/test_commands.py index 59c900d0b..2c3d67a38 100644 --- a/api/tests/common/test_commands.py +++ b/api/tests/common/test_commands.py @@ -117,7 +117,8 @@ commands = ["createsuperuser", "makemigrations"] @pytest.mark.parametrize("command", commands) -def test_blocked_commands(command): +def test_blocked_commands(command, mocker): + mocker.patch.dict(os.environ, {"FORCE": "0"}) with pytest.raises(CommandError): call_command(command)