test: Patch environment to increase test stability
This commit is contained in:
parent
c79d14f342
commit
0e439b4c6e
|
@ -117,7 +117,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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue