test: Patch environment to increase test stability
This commit is contained in:
parent
8d162fdaf8
commit
c93f5ea09d
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue