-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
111 additions
and
59 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -200,14 +200,14 @@ def test_fingerprints_body(self): | |
mail = mailparser.parse_from_file(mail_test_1) | ||
md5, sha1, sha256, sha512 = fingerprints( | ||
mail.body.encode("utf-8")) | ||
self.assertEqual(md5, "1bbdb7dcf511113bbc0c1b214aeac392") | ||
self.assertEqual(sha1, "ce9e62b50fa4e2168278880b14460b905b24eb4b") | ||
self.assertEqual(sha256, ("1e9b96e3f1bc74702f9703391e8ba0715b849" | ||
"7127a7ff857013ab33385898574")) | ||
self.assertEqual(sha512, ("ad858f7b5ec5549e55650fd13df7683e403489" | ||
"77522995851fb6b625ac54744cf3a4bf652784" | ||
"dba971ef99afeec4e6caf2fdd10be72eabb730" | ||
"c312ffbe1c4de3")) | ||
self.assertEqual(md5, "55852a2efe95e7249887c92cc02123f8") | ||
self.assertEqual(sha1, "62fef1e38327ed09363624c3aff8ea11723ee05f") | ||
self.assertEqual(sha256, ("cd4af1017f2e623f6d38f691048b6" | ||
"a28d8b1f44a0478137b4337eac6de78f71a")) | ||
self.assertEqual(sha512, ("4a573c7929b078f2a2c1c0f869d418b0c020d4" | ||
"d37196bd6dcc209f9ccb29ca67355aa5e47b97" | ||
"c8bf90377204f59efde7ba1fc071b6f250a665" | ||
"72f63b997e92e8")) | ||
|
||
def test_fingerprints_unicodeencodeerror(self): | ||
mail = mailparser.parse_from_file(mail_test_7) | ||
|
@@ -456,7 +456,7 @@ def test_parse_from_file_msg(self): | |
m = mailparser.parse_from_file_msg(mail_outlook_1) | ||
email = m.mail | ||
self.assertIn("attachments", email) | ||
self.assertEqual(len(email["attachments"]), 5) | ||
self.assertEqual(len(email["attachments"]), 6) | ||
self.assertIn("from", email) | ||
self.assertEqual(email["from"][0][1], "[email protected]") | ||
self.assertIn("subject", email) | ||
|
@@ -564,11 +564,7 @@ def test_ported_string(self): | |
s = ported_string(raw_data) | ||
self.assertEqual(s, six.text_type()) | ||
|
||
raw_data = "test " | ||
s = ported_string(raw_data) | ||
self.assertEqual(s, "test") | ||
|
||
raw_data = u"test " | ||
raw_data = u"test" | ||
s = ported_string(raw_data) | ||
self.assertEqual(s, "test") | ||
|
||
|
@@ -671,5 +667,6 @@ def test_write_uuencode_attachment(self): | |
shutil.rmtree(temp_dir) | ||
self.assertEqual(md5.hexdigest(), '4f2cf891e7cfb349fca812091f184ecc') | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main(verbosity=2) |
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