Skip to content

Commit

Permalink
fix: use right type in comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
aitorres committed Oct 7, 2023
1 parent b38c60e commit 723fb44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def _download_book(book_id: int) -> Optional[BytesIO]:
monkeypatch.setattr(cli, "setup_settings", lambda: None)
monkeypatch.setattr(cli, "download_book", _download_book)
monkeypatch.setattr("getpass.getpass", _getpass_mock)
monkeypatch.setattr(cli, "send_book", lambda book_id, *_: book_id != "5678")
monkeypatch.setattr(cli, "send_book", lambda book_id, *_: book_id != 5678)

with patch.object(
sys, "argv", ["gutenberg2kindle", "send", "--book-id", "1234", "5678", "9101"]
Expand Down Expand Up @@ -225,7 +225,7 @@ def _download_book(book_id: int) -> Optional[BytesIO]:
monkeypatch.setattr(cli, "setup_settings", lambda: None)
monkeypatch.setattr(cli, "download_book", _download_book)
monkeypatch.setattr("getpass.getpass", _getpass_mock)
monkeypatch.setattr(cli, "send_book", lambda book_id, *_: book_id != "5678")
monkeypatch.setattr(cli, "send_book", lambda book_id, *_: book_id != 5678)

with patch.object(
sys,
Expand Down

0 comments on commit 723fb44

Please # to comment.