summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email.py
Commit message (Collapse)AuthorAgeFilesLines
* test_parseaddr_empty(): New test for assuring thatBarry Warsaw2001-12-201-0/+4
| | | | | Utils.parseaddr('<>') -- i.e. on an empty address, returns the empty string. Built on rfc822, this used to return None.
* I found that when run as a script, this test suite ran its testsGuido van Rossum2001-12-071-6/+6
| | | | | | twice! Fixed this by avoiding the import of test_email, which loads the module a second time in that situation, and fiddled the __main__ section to resemble other test suites using unittest.
* test_formatdate(): Integrating Jack's 22b2 branch fix for Mac epoch:Barry Warsaw2001-11-271-3/+4
| | | | | | | | More changes to the formatdate epoch test: the Mac epoch is in localtime, so east of GMT it falls in 1903:-( Changed the test to obtain the epoch in both local time and GMT, and do the right thing in the comparisons. As a sanity measure also check that day/month is Jan 1.
* test_formatdate(): Remove the unnecessary ldate calculation.Barry Warsaw2001-11-191-3/+6
| | | | | test_formatdate_zoneoffsets() => test_formatdate_localtime(): Do the sign corrected calculation of the zone offset.
* test_formatdate(), test_formatdate_zoneoffsets(): Two changes. First,Barry Warsaw2001-11-191-17/+16
| | | | | | | | | | | use the correct way to test for epoch, by looking at the year component of gmtime(0). Add clause for Unix epoch and Mac epoch (Tim, what is Windows epoch?). Also, get rid of the strptime() test, it was way too problematic given that strptime() is missing on many platforms and issues with locales. Instead, simply test that formatdate() gets the numeric timezone calculation correct for the altzone and timezone.
* test_formatdate(): A test that has a mild hope of working on Mac,Barry Warsaw2001-11-181-1/+11
| | | | | which has a different epoch than *nix. Jack may need to twiddle the details.
* Add tests for bug #478115, parsedate_tz() IndexError when a Date:Barry Warsaw2001-11-131-0/+3
| | | | field exists with an empty value.
* test_formatdate(): Dang. Typo.Barry Warsaw2001-11-091-1/+1
|
* test_formatdate(): Don't do the localtime test if we don't haveBarry Warsaw2001-11-091-10/+12
| | | | strptime() -- I'm too lazy to code it otherwise.
* test_formatdate(): A test for email.Utils.formatdate().Barry Warsaw2001-11-091-0/+16
|
* A fix for SF bug #472560, extra newlines returned by get_param() whenBarry Warsaw2001-10-251-0/+4
| | | | | | | | the separating semi-colon shows up on a continuation line (legal, but weird). Bug reported and fixed by Matthew Cowles. Test case and sample email included.
* Another merge from mimelib:Barry Warsaw2001-10-191-0/+27
| | | | | TestMIMEMessage.test_epilogue(), TestIdempotent.test_preamble_epilogue(): Test cases for SF bug #472481.
* Whitespace normalization.Tim Peters2001-10-181-1/+1
|
* Two merges from the mimelib project:Barry Warsaw2001-10-171-0/+34
| | | | | | | | | test_no_semis_header_splitter(): This actually should still split. test_no_split_long_header(): An example of an unsplittable line. test_no_semis_header_splitter(): Test for SF bug # 471918, Generator splitting long headers.
* test_typed_subpart_iterator_default_type(): Test for when the messageBarry Warsaw2001-10-151-0/+18
| | | | has no Content-Type: header, it should be treated as text/plain.
* Add a test for the HeaderParser class.Barry Warsaw2001-10-111-1/+17
|
* Added tests for MIMEAudio class/moduleBarry Warsaw2001-10-091-4/+69
|
* Add a test for get_all() returning failobj. msg_20.txt is a sampleBarry Warsaw2001-10-091-0/+6
| | | | message with multiple CC: fields, used in the get_all() test.
* TestIterators: Tim Peters suggests a more succinct spelling ofBarry Warsaw2001-10-041-12/+4
| | | | "listify an iterator".
* test_header_splitter(), test_body_line_iterator(): Move the test dataBarry Warsaw2001-10-041-70/+32
| | | | into tests/data/msg_*.txt files.
* This test relied on hard tab characters, so failed after whitespaceTim Peters2001-10-041-5/+5
| | | | normalization. Now uses \t in strings instead of hard tabs.
* Whitespace normalization.Tim Peters2001-10-041-30/+30
|
* Update the tests for the current incarnation of the email package, andBarry Warsaw2001-09-261-105/+198
| | | | added some new tests of message/delivery-status content type messages.
* An extensive test suite for the email package.Barry Warsaw2001-09-231-0/+797