-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8cb9d32
commit 791ffb5
Showing
1 changed file
with
14 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -245,23 +245,20 @@ def test_write(self): | |
|
||
self.assertEqual(len(cl.entries), 3) | ||
cl.write(path="/who/cares/test.changes") | ||
|
||
self.assertEqual(len(omock.mock_calls), 6) | ||
content = "".join(str(omock.mock_calls[x][1][0]) | ||
for x in range(2, 5)) | ||
|
||
self.assertEqual( | ||
content, | ||
"-------------------------------------------------------------------\n" | ||
"Tue Jan 01 00:00:00 UTC 2019 - Andreas Hasenkopf <[email protected]>\n\n" | ||
"Føø Bar\n\n" | ||
"-------------------------------------------------------------------\n" | ||
"Mon Jan 01 00:00:00 UTC 2018 - Andreas Pritschet <[email protected]>\n\n" | ||
"Hellø Wørld\n\n" | ||
"-------------------------------------------------------------------\n" | ||
"Sun Jan 01 00:00:00 UTC 2017 - Andreas Hasenkopf <[email protected]>\n\n" | ||
"First enŧry\n\n" | ||
) | ||
calls = [ | ||
mock.call().write( | ||
'-------------------------------------------------------------------\n' | ||
'Tue Jan 01 00:00:00 UTC 2019 - Andreas Hasenkopf <[email protected]>' | ||
'\n\nFøø Bar\n\n'), | ||
mock.call().write( | ||
'-------------------------------------------------------------------\n' | ||
'Mon Jan 01 00:00:00 UTC 2018 - Andreas Pritschet <[email protected]>' | ||
'\n\nHellø Wørld\n\n'), | ||
mock.call().write( | ||
'-------------------------------------------------------------------\n' | ||
'Sun Jan 01 00:00:00 UTC 2017 - Andreas Hasenkopf <[email protected]>' | ||
'\n\nFirst enŧry\n\n')] | ||
omock.assert_has_calls(calls, any_order=True) | ||
|
||
def test_write_stringio(self): | ||
buffer = StringIO("") | ||
|