test: Patch environment to increase test stability

This commit is contained in:
Georg Krause 2024-01-22 13:12:18 +00:00 committed by Georg Krause
parent 126258298a
commit 49d21b7a0f
1 changed files with 2 additions and 1 deletions

View File

@ -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)