summaryrefslogtreecommitdiffstats
path: root/Lib/email/test/test_email.py
Commit message (Collapse)AuthorAgeFilesLines
* Port of r42279 to email 3.0, but without the Python 2.1 backward compatibleBarry Warsaw2006-02-091-0/+13
| | | | | | nonsense. Resolve SF bug 1409403: email.Message should supress warning from uu.decode.
* Port of r42271 from the trunk -- relevant patches for SF 1409455 for emailBarry Warsaw2006-02-081-1/+2
| | | | 3.0/Python 2.4.
* Resolves SF bug #1423972.Barry Warsaw2006-02-041-2/+4
|
* Port r42228 from the trunk.Barry Warsaw2006-02-031-0/+9
|
* SF bug #1347874; FeedParser does not comply with RFC2822.Barry Warsaw2006-01-171-0/+9
| | | | | Change headerRE as suggested in the bug report, so that single character headers are accepted. Test case added too. Backported from the trunk.
* Ported 42076 from the trunk.Barry Warsaw2006-01-171-1/+8
| | | | | | | | | | | SF bug #1403349 solution for email 3.0; some MUAs use the 'file' parameter name in the Content-Distribution header, so Message.get_filename() should fall back to using that. Also, bump the email package version to 3.0.1 for eventual release. Of course, add a test case too. XXX Need to update the documentation.
* fix broken (unexecuted) testAnthony Baxter2005-06-081-3/+3
|
* Fixes for SF #1076485, which I'll apply to the CVS head too. The problem wasBarry Warsaw2004-12-051-1/+43
| | | | | | | | | | | | | | | | caused by a self._input.readline() call that wasn't checking for the NeedsMoreData marker. msg_43.txt contains a message that illustrates the problem, when email.message_from_*() is called. That interface uses the Parser API, which splits reads into 8192 byte chunks. It so happens that for the test message, the 8192 chunk falls inside a message/delivery-status, which is where in the FeedParser the readline() call was that didn't check for NeedsMoreData. I also added an assert to unreadline() so it'll be more evident if an attempt to push back NeedsMoreData ever happens again. Bump the email package version number.
* RFC 2822 describes the characters allowed in a header field name. Conform toBarry Warsaw2004-11-291-0/+16
| | | | this, and add test cases.
* Fix for SF bug #1072623. When the last line of the input string does not endBarry Warsaw2004-11-281-0/+14
| | | | | | | | | in a newline, and it's an end boundary, the FeedParser wasn't recognizing it as such. Tweak the regexp to make the ending linesep optional. For grins, clear self._partial when closing the BufferedSubFile. Added a test case.
* test_boundary_with_leading_space(): Test case for SF bug #1060941. RFC 2046Barry Warsaw2004-11-061-0/+19
| | | | | | says boundaries may begin -- but not end -- with whitespace. I will backport to Python 2.3.
* Added a usegmt flag to email.Utils.formatdate - this allows it to beAnthony Baxter2004-10-111-0/+9
| | | | | used to replace rfc822.formatdate for protocols like HTTP (where 'GMT' must be the timezone string).
* test_missing_start_boundary(): A test for SF bug # 1030941.Barry Warsaw2004-10-091-0/+15
|
* Big email 3.0 API changes, with updated unit tests and documentation.Barry Warsaw2004-10-031-115/+43
| | | | | | | | | | | | | | | | | Briefly (from the NEWS file): - Updates for the email package: + All deprecated APIs that in email 2.x issued warnings have been removed: _encoder argument to the MIMEText constructor, Message.add_payload(), Utils.dump_address_pair(), Utils.decode(), Utils.encode() + New deprecations: Generator.__call__(), Message.get_type(), Message.get_main_type(), Message.get_subtype(), the 'strict' argument to the Parser constructor. These will be removed in email 3.1. + Support for Python earlier than 2.3 has been removed (see PEP 291). + All defect classes have been renamed to end in 'Defect'. + Some FeedParser fixes; also a MultipartInvariantViolationDefect will be added to messages that claim to be multipart but really aren't. + Updates to documentation.
* Test cases and fixes for bugs described in patch #873418: email/Message.py:Barry Warsaw2004-08-161-0/+12
| | | | del_param fails when specifying a header.
* Resolution of bug #997368, "strftime() backward compatibility".Barry Warsaw2004-08-071-2/+2
| | | | | | | | | Specifically, time.strftime() no longer accepts a 0 in the yday position of a time tuple, since that can crash some platform strftime() implementations. parsedate_tz(): Change the return value to return 1 in the yday position. Update tests in test_rfc822.py and test_email.py
* Resolution of SF bug #1002475 and patch #1003693; Header lines that end inBarry Warsaw2004-08-071-1/+30
| | | | | | | | | | \r\n only get the \n stripped, not the \r (unless it's the last header which does get the \r stripped). Patch by Tony Meyer. test_whitespace_continuation_last_header(), test_strip_line_feed_and_carriage_return_in_headers(): New tests. _parse_headers(): Be sure to strip \r\n from the right side of header lines.
* test_boundary_in_non_multipart(): Added a test for SF bug # 846938.Barry Warsaw2004-05-131-0/+15
|
* test_nested_inner_contains_outer_boundary(), test_nested_with_same_boundary():Barry Warsaw2004-05-131-0/+36
| | | | Two evil samples from Anthony's MIME torture tests.
* More boiled down tests from Anthony's big torture suite.Barry Warsaw2004-05-111-2/+26
|
* test_mime_attachments_in_constructor(): New test to check for SF bug # 884030.Barry Warsaw2004-05-091-0/+9
|
* A bunch of new tests, and updated tests for the email 3.0 FeedParser.Barry Warsaw2004-05-091-63/+189
|
* test_email: comment out two fail-test cases that no longer fail with the newThomas Wouters2004-03-201-25/+27
| | | | | parser -- for now. Failure behaviour of the new parser(s) will change in any case, so this will be revisited later anyway.
* test_get_param_with_semis_in_quotes(): Test case for SF bug #794466.Barry Warsaw2003-09-031-0/+7
| | | | Backport candidate.
* test_rfc2231_no_language_or_charset_in_filename(),Barry Warsaw2003-08-191-0/+37
| | | | | | | | | test_rfc2231_no_language_or_charset_in_boundary(), test_rfc2231_no_language_or_charset_in_charset(): New tests for proper decoding of some RFC 2231 headers. Backport candidate (as was the Utils.py 1.25 change) to both Python 2.3.1 and 2.2.4 -- will do momentarily.
* A couple of new parsedate test cases.Barry Warsaw2003-05-081-0/+10
|
* Get rid of some hard coded tabsBarry Warsaw2003-04-241-3/+3
|
* test_whitespace_eater_unicode_2(): Test case for SF bug #710498.Barry Warsaw2003-03-301-0/+9
|
* test_long_lines_with_different_header(): Another test from Jason.Barry Warsaw2003-03-171-0/+16
|
* test_getaddresses_nasty(): A test for mimelib SF bug # 697641.Barry Warsaw2003-03-171-0/+10
|
* test_whitespace_eater_unicode(): Make this test Python 2.1 compatible.Barry Warsaw2003-03-121-1/+4
|
* Adjust tests for no newline appending to MIMEText.__init__()'s _textBarry Warsaw2003-03-111-11/+7
| | | | argument.
* test_get_decoded_uu_payload(): A new test forBarry Warsaw2003-03-111-0/+11
| | | | Content-Transfer-Encoding: x-uuencode
* test_escape_backslashes(): A test for SF bug #663369 by Matthew Woodcraft.Barry Warsaw2003-03-101-0/+8
|
* Fix base classBarry Warsaw2003-03-101-1/+1
|
* Use ndiffAssertEqual in a couple of places for better error reporting.Barry Warsaw2003-03-101-3/+6
|
* test_broken_base64_payload(): Test for crash in low-level binasciiBarry Warsaw2003-03-101-0/+8
| | | | module when decoding a message with broken base64.
* test_another_long_multiline_header(): Yet another formatting test.Barry Warsaw2003-03-101-0/+12
|
* test_long_unbreakable_lines_with_continuation(): Another funky exampleBarry Warsaw2003-03-071-0/+16
| | | | from Jason Mastaler :)
* test_rfc2231_no_language_or_charset(): RFC 2231 allows leaving outBarry Warsaw2003-03-071-0/+11
| | | | both the charset and language without including any single quotes.
* whitespace normalizationBarry Warsaw2003-03-071-6/+6
|
* test_string_headerinst_eq(): Another Jason test :)Barry Warsaw2003-03-071-0/+14
|
* test_long_received_header(): Another test case for folding longBarry Warsaw2003-03-061-0/+15
| | | | | Received headers (first on semis then on whitespace), given by Jason Mastaler.
* test_whitespace_eater_unicode(): Test of the last outstanding bug inBarry Warsaw2003-03-061-0/+8
| | | | SF # 640110.
* test_rfc2047_multiline(): Test case for SF bug #640110.Barry Warsaw2003-03-061-0/+14
|
* Merge of the folding-reimpl-branch. Specific changes,Barry Warsaw2003-03-061-58/+151
| | | | Update tests for email 2.5.
* Jack complained that on test_crlf_separation() was failing on MacOS9Barry Warsaw2003-01-021-4/+4
| | | | | | | | | | | | because the test file, msg_26.txt which has \r\n line endings, was getting munged by cvs, which knows to do line ending conversions for text files. But we want \r\n to be preserved on all platforms, so we cvs admin'd the file to be -kb (binary), which means we have to open the file in binary mode to preserve these line ends. Hopefully this will be the end of the thrashing on this issue (but probably not). Test passes on *nix now, and Tim confirms it passes on Windows. We'll leave it to Jack to test MacOS.
* test_bad_8bit_header(): Tests for optional argument `errors'. See SFBarry Warsaw2002-12-301-0/+11
| | | | bug #648119.
* TestMIMEAudio.setUp(): Use the email package's copy of the audio testBarry Warsaw2002-12-301-2/+7
| | | | | | file, needed because some binary distros (read RPMs) don't include the test module in their standard Python package. This eliminates an external dependency and closes SF bug # 650441.
* test_parsedate_compact(): A test for optional FWS between the commaBarry Warsaw2002-12-301-0/+5
| | | | | and the day number in an RFC 2822 date specification. See bug #552345.