Skip to content

Commit

Permalink
Add assertion that the command under test is the expected UpdateComma…
Browse files Browse the repository at this point in the history
…nd type
  • Loading branch information
Cypher1 committed Feb 5, 2024
1 parent 8e6b950 commit 8fa572e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/console/commands/test_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import pytest

from tests.helpers import get_package
from poetry.console.commands.update import UpdateCommand


if TYPE_CHECKING:
Expand Down Expand Up @@ -92,6 +93,7 @@ def test_update_sync_option_is_passed_to_the_installer(
The --sync option is passed properly to the installer from update.
"""
tester = command_tester_factory("update", poetry=poetry_with_outdated_lockfile)
assert isinstance(tester.command, UpdateCommand)
mocker.patch.object(tester.command.installer, "run", return_value=1)

tester.execute("--sync")
Expand Down

0 comments on commit 8fa572e

Please sign in to comment.