test: Patch environment to increase test stability

environments/review-docs-feat-z0hkbz/deployments/20103
Georg Krause 2024-01-22 13:12:18 +00:00 zatwierdzone przez upsiflu
rodzic 8d162fdaf8
commit c93f5ea09d
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -117,7 +117,8 @@ commands = ["createsuperuser", "makemigrations"]
@pytest.mark.parametrize("command", commands) @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): with pytest.raises(CommandError):
call_command(command) call_command(command)