test: Patch environment to increase test stability

This commit is contained in:
Georg Krause 2024-01-22 13:12:18 +00:00
parent 22cc1925fa
commit 8deddf358d
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)