test: Patch environment to increase test stability

2274-implement-new-upload-api
Georg Krause 2024-01-22 13:12:18 +00:00 zatwierdzone przez Georg Krause
rodzic 126258298a
commit 49d21b7a0f
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)