Skip to content

Commit

Permalink
fix paths since rename
Browse files Browse the repository at this point in the history
  • Loading branch information
araghukas committed Nov 29, 2023
1 parent ead6555 commit 8f69448
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/covalent_dispatcher_tests/_cli/groups/db_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ def test_alembic_command_args(mocker):
MOCK_ALEMBIC_ARGS_INVALID = "some alembic command --with-flags -m 'comment'"
ALEMBIC_ERROR_STDERR = b"alembic: error: invalid..."
ALEMBIC_ERROR_STDOUT = b"b60c5 (head)"
popen_mock = mocker.patch.object(sys.modules["covalent_dispatcher._cli.groups.db"], "Popen")
popen_mock = mocker.patch.object(
sys.modules["covalent_dispatcher._cli.groups.db_group"], "Popen"
)
# test valid alembic args
popen_mock().communicate.return_value = (ALEMBIC_ERROR_STDOUT, b"")
res = runner.invoke(alembic, MOCK_ALEMBIC_ARGS_VALID, catch_exceptions=False)
Expand All @@ -61,7 +63,9 @@ def test_alembic_not_installed_error(mocker):
runner = CliRunner()
MOCK_ALEMBIC_ARGS = "current"
EXCEPTION_MESSAGE = "[Errno 2] No such file or directory: 'alembic'"
popen_mock = mocker.patch.object(sys.modules["covalent_dispatcher._cli.groups.db"], "Popen")
popen_mock = mocker.patch.object(
sys.modules["covalent_dispatcher._cli.groups.db_group"], "Popen"
)
popen_mock.side_effect = FileNotFoundError(EXCEPTION_MESSAGE)
res = runner.invoke(alembic, MOCK_ALEMBIC_ARGS, catch_exceptions=False)
assert EXCEPTION_MESSAGE in res.output
Expand Down

0 comments on commit 8f69448

Please sign in to comment.