From: Menno Smits Date: Wed, 8 Sep 2010 12:46:49 +0000 (+0100) Subject: Failing test added for #55 X-Git-Tag: 0.7~20 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=5791ba0dbc39613fff4b23fdab422b7e98023e62;p=imapclient.git Failing test added for #55 --- diff --git a/imapclient/test/test_response_parser.py b/imapclient/test/test_response_parser.py index 8aae152..be407c9 100644 --- a/imapclient/test/test_response_parser.py +++ b/imapclient/test/test_response_parser.py @@ -252,6 +252,14 @@ class TestParseFetchResponse(unittest.TestCase): 'SEQ': 1}}) + def test_BODY_HEADER_FIELDS(self): + header_text = 'Subject: A subject\r\nFrom: Some one \r\n\r\n' + self.assertEquals(parse_fetch_response( + [('123 (UID 31710 BODY[HEADER.FIELDS (FROM SUBJECT)] {57}', header_text), ')']), + { 31710: {'BODY[HEADER.FIELDS (FROM SUBJECT)]': header_text, + 'SEQ': 123}}) + + def test_INTERNALDATE(self): def check(date_str, expected_dt): output = parse_fetch_response(['3 (INTERNALDATE "%s")' % date_str])