diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-04-07 15:17:52 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-04-07 15:17:52 +0300 |
commit | 8641f60050771c431a63c35839bf68f5739f4d73 (patch) | |
tree | fcaf553b5df910a4a27a09f7eb1733d4ca84bb1c | |
parent | 4a459519f2f841d1283dca347c28cc5e6a4009ea (diff) | |
download | distix-8641f60050771c431a63c35839bf68f5739f4d73.tar.gz |
Add References test
-rw-r--r-- | distixlib/msg_id_extractor_tests.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/distixlib/msg_id_extractor_tests.py b/distixlib/msg_id_extractor_tests.py index b47b0f3..0b5c82a 100644 --- a/distixlib/msg_id_extractor_tests.py +++ b/distixlib/msg_id_extractor_tests.py @@ -48,3 +48,18 @@ Wherefore art thou? msg = email.message_from_string(msg_text) self.assertEqual( distixlib.get_ids_from_message(msg), set(['capulet123@verona'])) + + def test_returns_ids_from_references(self): + msg_text = '''\ +From: user@example.com +To: other@example.com +Subject: O, Romeo +References: <capulet123@verona>, <capulet456@verona> + +Wherefore art thou? +''' + + msg = email.message_from_string(msg_text) + self.assertEqual( + distixlib.get_ids_from_message(msg), + set(['capulet123@verona', 'capulet456@verona'])) |