-
Notifications
You must be signed in to change notification settings - Fork 177
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
Showing
10 changed files
with
69 additions
and
9 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
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -166,22 +166,23 @@ def test_fetch(self): | |
backend = MBox('http://example.com/', self.tmp_path) | ||
messages = [m for m in backend.fetch()] | ||
|
||
expected = [('<[email protected]>', 1291210000.0), | ||
('<[email protected]>', 1291210000.0), | ||
('<[email protected]>', 1095843820.0), | ||
('<[email protected]>', 1205746505.0), | ||
('<019801ca633f$f4376140$dca623c0$@[email protected]>', 1257992964.0), | ||
('<[email protected]>', 1043881350.0), | ||
('<[email protected]>', 1291210000.0), | ||
('<[email protected]>', 1030123489.0)] | ||
expected = [('<[email protected]>', '86315b479b4debe320b59c881c1e375216cbf333', 1291210000.0), | ||
('<[email protected]>', '86315b479b4debe320b59c881c1e375216cbf333', 1291210000.0), | ||
('<[email protected]>', 'bd0185317b013beb21ad3ea04635de3db72496ad', 1095843820.0), | ||
('<[email protected]>', '51535703010a3e63d5272202942c283394cdebca', 1205746505.0), | ||
('<019801ca633f$f4376140$dca623c0$@[email protected]>', '302e314c07242bb4750351286862f49e758f3e17', 1257992964.0), | ||
('<[email protected]>', 'ddda42422c55d08d56c017a6f128fcd7447484ea', 1043881350.0), | ||
('<[email protected]>', '86315b479b4debe320b59c881c1e375216cbf333', 1291210000.0), | ||
('<[email protected]>', '4e255acab6442424ecbf05cb0feb1eccb587f7de', 1030123489.0)] | ||
|
||
self.assertEqual(len(messages), len(expected)) | ||
|
||
for x in range(len(messages)): | ||
message = messages[x] | ||
self.assertEqual(message['Message-ID'], expected[x][0]) | ||
self.assertEqual(message['__metadata__']['origin'], 'http://example.com/') | ||
self.assertEqual(message['__metadata__']['updated_on'], expected[x][1]) | ||
self.assertEqual(message['__metadata__']['uuid'], expected[x][1]) | ||
self.assertEqual(message['__metadata__']['updated_on'], expected[x][2]) | ||
|
||
def test_ignore_messages(self): | ||
"""Test if it ignores some messages without mandatory fields""" | ||
|