Skip to content

Commit

Permalink
fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saxix committed Oct 21, 2024
1 parent 35379ab commit ab57cc0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_upgrade_init(
admin_password="123",
migrate=migrate,
stdout=out,
check=False,
checks=False,
verbosity=verbosity,
)
assert "error" not in str(out.getvalue())
Expand All @@ -90,7 +90,7 @@ def test_upgrade(verbosity: int, migrate: int, monkeypatch: MonkeyPatch, environ
out = StringIO()
SuperUserFactory()
with mock.patch.dict(os.environ, environment, clear=True):
call_command("upgrade", stdout=out, check=False, verbosity=verbosity)
call_command("upgrade", stdout=out, checks=False, verbosity=verbosity)
assert "error" not in str(out.getvalue())


Expand All @@ -99,14 +99,14 @@ def test_upgrade_next(mocked_responses: RequestsMock) -> None:

SuperUserFactory()
out = StringIO()
call_command("upgrade", stdout=out, check=False)
call_command("upgrade", stdout=out, checks=False)
assert "error" not in str(out.getvalue())


def test_upgrade_check(mocked_responses: RequestsMock, admin_user: "User", environment: dict[str, str]) -> None:
out = StringIO()
with mock.patch.dict(os.environ, environment, clear=True):
call_command("upgrade", stdout=out, check=True)
call_command("upgrade", stdout=out, checks=True)


@pytest.mark.django_db(transaction=True)
Expand All @@ -121,7 +121,7 @@ def test_upgrade_admin(mocked_responses: RequestsMock, environment: dict[str, st

out = StringIO()
with mock.patch.dict(os.environ, environment, clear=True):
call_command("upgrade", stdout=out, check=True, admin_email=email)
call_command("upgrade", stdout=out, checks=True, admin_email=email)


@pytest.mark.django_db(transaction=True)
Expand Down

0 comments on commit ab57cc0

Please sign in to comment.