test: Patch environment to increase test stability

merge-requests/2666/merge^2
Georg Krause 2024-01-22 13:12:18 +00:00
rodzic 22cc1925fa
commit 8deddf358d
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -106,7 +106,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)