Skip to content

Commit c92076b

Browse files
committed
more better mocking
1 parent 50f32e1 commit c92076b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/integration/test_list.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from .base import IntegrationBaseTestCase
22

33
import mock
4+
from mock import call
45

56
from beancmd import list_tubes
67

@@ -16,4 +17,8 @@ def test_list_tubes(self):
1617
])
1718
with mock.patch('sys.stdout.write') as mock_sys_stdout_write:
1819
list_tubes.run(args)
19-
assert mock_sys_stdout_write.called_once_with('bar\nbaz\ndefault\nfoo\n')
20+
21+
mock_sys_stdout_write.assert_has_calls([
22+
call('bar\nbaz\ndefault\nfoo'),
23+
call('\n')
24+
])

0 commit comments

Comments
 (0)