Skip to content

Commit

Permalink
called_once_with is not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Nov 20, 2023
1 parent c73e9da commit 0d1417c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_set_interactive(monkeypatch, mocked_set):
monkeypatch.setattr(sys.stdin, 'isatty', lambda: True)
monkeypatch.setattr(getpass, 'getpass', PasswordEmitter('foo123'))
tool.do_set()
assert mocked_set.called_once_with('svc', 'usr', 'foo123')
mocked_set.assert_called_once_with('svc', 'usr', 'foo123')


def test_set_pipe(monkeypatch, mocked_set):
Expand All @@ -54,7 +54,7 @@ def test_set_pipe(monkeypatch, mocked_set):
monkeypatch.setattr(sys.stdin, 'isatty', lambda: False)
monkeypatch.setattr(sys.stdin, 'read', lambda: 'foo123')
tool.do_set()
assert mocked_set.called_once_with('svc', 'usr', 'foo123')
mocked_set.assert_called_once_with('svc', 'usr', 'foo123')


def test_set_pipe_newline(monkeypatch, mocked_set):
Expand All @@ -64,4 +64,4 @@ def test_set_pipe_newline(monkeypatch, mocked_set):
monkeypatch.setattr(sys.stdin, 'isatty', lambda: False)
monkeypatch.setattr(sys.stdin, 'read', lambda: 'foo123\n')
tool.do_set()
assert mocked_set.called_once_with('svc', 'usr', 'foo123')
mocked_set.assert_called_once_with('svc', 'usr', 'foo123')

0 comments on commit 0d1417c

Please sign in to comment.