Commit Graph

83 Commits

Author SHA1 Message Date
Barry Warsaw 932874df39 test_boundary_with_leading_space(): Test case for SF bug #1060941. RFC 2046
says boundaries may begin -- but not end -- with whitespace.

I will backport to Python 2.3.
2004-11-06 00:04:20 +00:00
Anthony Baxter 3dd9e46161 Added a usegmt flag to email.Utils.formatdate - this allows it to be
used to replace rfc822.formatdate for protocols like HTTP (where 'GMT' must
be the timezone string).
2004-10-11 13:53:08 +00:00
Barry Warsaw 6bd55ee1ef An example message for SF bug # 1030941. 2004-10-09 22:57:57 +00:00
Barry Warsaw 83f1a1b1f7 test_missing_start_boundary(): A test for SF bug # 1030941. 2004-10-09 22:57:33 +00:00
Barry Warsaw 1b643596a8 Fix test for FeedParser results. 2004-10-03 04:02:43 +00:00
Barry Warsaw bb11386730 Big email 3.0 API changes, with updated unit tests and documentation.
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.
2004-10-03 03:16:19 +00:00
Barry Warsaw 06fa042034 Test cases and fixes for bugs described in patch #873418: email/Message.py:
del_param fails when specifying a header.
2004-08-16 15:47:34 +00:00
Barry Warsaw e8bedeb45b Resolution of bug #997368, "strftime() backward compatibility".
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
2004-08-07 16:38:40 +00:00
Barry Warsaw 8896bf56a2 Resolution of SF bug #1002475 and patch #1003693; Header lines that end in
\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.
2004-08-07 15:57:52 +00:00
Barry Warsaw ac606ccb79 forward porting from release23-maint 2004-05-13 23:18:54 +00:00
Barry Warsaw 2178a6d1a2 test_boundary_in_non_multipart(): Added a test for SF bug # 846938. 2004-05-13 23:17:04 +00:00
Barry Warsaw 58eb0fcb8f test_nested_inner_contains_outer_boundary(), test_nested_with_same_boundary():
Two evil samples from Anthony's MIME torture tests.
2004-05-13 20:15:20 +00:00
Barry Warsaw d0c12af7ef Another evil test from Anthony's suite. This one has an inner part with the
same boundary as the outer part.
2004-05-13 20:13:48 +00:00
Barry Warsaw dce231fb14 A boiled down example from Anthony's MIME torture tests. This one has a
separating boundary for an outer part inside an inner part.
2004-05-13 20:12:32 +00:00
Barry Warsaw b067e6287b More boiled down tests from Anthony's big torture suite. 2004-05-11 22:21:56 +00:00
Barry Warsaw 769f14a7c9 A boiled down message/external-body example from Anthony's torture test. 2004-05-11 22:20:59 +00:00
Barry Warsaw bce827bf12 An example with multiple boundary lines. 2004-05-11 22:20:05 +00:00
Barry Warsaw bfe18c096f test_mime_attachments_in_constructor(): New test to check for SF bug # 884030. 2004-05-09 18:03:36 +00:00
Barry Warsaw 09356d419c Like msg_12.txt but with some extra vertical whitespace around the inner
message's end boundary.
2004-05-09 03:17:29 +00:00
Barry Warsaw b8b57e75b2 A bunch of new tests, and updated tests for the email 3.0 FeedParser. 2004-05-09 03:16:03 +00:00
Thomas Wouters 1e1305491b test_email: comment out two fail-test cases that no longer fail with the new
parser -- for now. Failure behaviour of the new parser(s) will change in any
case, so this will be revisited later anyway.
2004-03-20 20:29:50 +00:00
Hye-Shik Chang 3e2a306920 Add CJK codecs support as discussed on python-dev. (SF #873597)
Several style fixes are suggested by Martin v. Loewis and
Marc-Andre Lemburg. Thanks!
2004-01-17 14:29:29 +00:00
Barry Warsaw 2e31ce2514 test_get_param_with_semis_in_quotes(): Test case for SF bug #794466.
Backport candidate.
2003-09-03 04:10:52 +00:00
Barry Warsaw 622d60b5a2 test_rfc2231_no_language_or_charset_in_filename(),
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.
2003-08-19 03:54:24 +00:00
Barry Warsaw f8b3e1f76e A couple of new parsedate test cases. 2003-05-08 03:34:01 +00:00
Barry Warsaw 0822ff7cca Get rid of some hard coded tabs 2003-04-24 15:58:47 +00:00
Barry Warsaw 9c505ae3da test_whitespace_eater_unicode_2(): Test case for SF bug #710498. 2003-03-30 20:47:22 +00:00
Barry Warsaw 240754933e test_long_lines_with_different_header(): Another test from Jason. 2003-03-17 20:35:14 +00:00
Barry Warsaw ab75840cd0 test_getaddresses_nasty(): A test for mimelib SF bug # 697641. 2003-03-17 18:36:37 +00:00
Barry Warsaw ea8f6fa094 test_whitespace_eater_unicode(): Make this test Python 2.1 compatible. 2003-03-12 03:14:11 +00:00
Barry Warsaw f9e0bd8df8 Adjust tests for no newline appending to MIMEText.__init__()'s _text
argument.
2003-03-11 05:10:46 +00:00
Barry Warsaw bd757ba1ed Adjust tests for no newline appending to MIMEText.__init__()'s _text
argument.
2003-03-11 05:04:54 +00:00
Barry Warsaw 3840b49d9c test_get_decoded_uu_payload(): A new test for
Content-Transfer-Encoding: x-uuencode
2003-03-11 04:31:37 +00:00
Barry Warsaw a2e64702ca test_escape_backslashes(): A test for SF bug #663369 by Matthew Woodcraft. 2003-03-10 19:18:34 +00:00
Barry Warsaw 513af770d7 Fix base class 2003-03-10 17:00:43 +00:00
Barry Warsaw e1ff4bbce6 Use ndiffAssertEqual in a couple of places for better error reporting. 2003-03-10 16:59:34 +00:00
Barry Warsaw 3efb651ea3 test_broken_base64_payload(): Test for crash in low-level binascii
module when decoding a message with broken base64.
2003-03-10 16:09:51 +00:00
Barry Warsaw 796376338f test_another_long_multiline_header(): Yet another formatting test. 2003-03-10 15:11:29 +00:00
Barry Warsaw 28ffcef4e6 test_long_unbreakable_lines_with_continuation(): Another funky example
from Jason Mastaler :)
2003-03-07 23:23:04 +00:00
Barry Warsaw 21fcc4e287 test_rfc2231_no_language_or_charset(): RFC 2231 allows leaving out
both the charset and language without including any single quotes.
2003-03-07 22:45:55 +00:00
Barry Warsaw bf7e241397 whitespace normalization 2003-03-07 15:58:51 +00:00
Barry Warsaw 82783e6f33 test_string_headerinst_eq(): Another Jason test :) 2003-03-07 15:35:47 +00:00
Barry Warsaw f0d3585669 test_long_received_header(): Another test case for folding long
Received headers (first on semis then on whitespace), given by Jason
Mastaler.
2003-03-06 20:31:02 +00:00
Barry Warsaw c79ffb022f test_whitespace_eater_unicode(): Test of the last outstanding bug in
SF # 640110.
2003-03-06 16:11:14 +00:00
Barry Warsaw 28ffcb6f84 test_rfc2047_multiline(): Test case for SF bug #640110. 2003-03-06 06:38:29 +00:00
Barry Warsaw 10627ba9b8 Merge of the folding-reimpl-branch. Specific changes,
Update tests for email 2.5.
2003-03-06 05:41:07 +00:00
Barry Warsaw 3d597812b6 Jack complained that on test_crlf_separation() was failing on MacOS9
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.
2003-01-02 22:48:36 +00:00
Barry Warsaw 10ee7a7f15 test_bad_8bit_header(): Tests for optional argument `errors'. See SF
bug #648119.
2002-12-30 19:14:38 +00:00
Barry Warsaw f29ffbdbf5 TestMIMEAudio.setUp(): Use the email package's copy of the audio test
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.
2002-12-30 17:45:02 +00:00
Barry Warsaw c99c08c764 A copy of the audio test file from Lib/test, 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.
2002-12-30 17:44:27 +00:00