test: Patch environment to increase test stability
This commit is contained in:
parent
126258298a
commit
49d21b7a0f
|
@ -106,7 +106,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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue