summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_email
Commit message (Collapse)AuthorAgeFilesLines
* Issue #22932: Fix timezones in email.utils.formatdate.Robert Collins2015-07-311-0/+20
| | | | Patch from Dmitry Shachnev.
* Issue #6598: Increased time precision and random number range inSerhiy Storchaka2015-05-191-1/+24
| | | | email.utils.make_msgid() to strengthen the uniqueness of the message ID.
* Issue #23943: Fix typos. Patch by Piotr Kasprzyk.Berker Peksag2015-04-141-1/+1
|
* #23745: handle duplicate MIME parameter names in new parser.R David Murray2015-03-301-0/+109
| | | | | | | | | | This mimics get_param's error handling for the most part. It is slightly better in some regards as get_param can produce some really weird results for duplicate *0* parts. It departs from get_param slightly in that if we have a mix of non-extended and extended pieces for the same parameter name, the new parser assumes they were all supposed to be extended and concatenates all the values, whereas get_param always picks the non-extended parameter value. All of this error recovery is pretty much arbitrary decisions...
* handle headers with no key (closes #19996)Benjamin Peterson2015-01-261-0/+6
| | | | Patch by Cory Benfield.
* Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-6/+8
|
* #21991: make headerregistry params property MappingProxyType.R David Murray2014-10-171-0/+3
| | | | | | | | | It is unlikely anyone is using the fact that the dictionary returned by the 'params' attribute was previously writable, but even if someone is the API is provisional so this kind of change is acceptable (and needed, to get the API "right" before it becomes official). Patch by Stéphane Wirtel.
* #21091: make is_attachment a method.R David Murray2014-09-201-5/+15
| | | | | | Since EmailMessage is a provisional API we can fix API bugs in a maintenance release, but I used a trick suggested by Serhiy to maintain backward compatibility with 3.4.0/1.
* #21079: is_attachment now looks only at the value, ignoring parameters.R David Murray2014-09-201-1/+2
|
* Decreased memory requirements of new tests added in issue21448.Serhiy Storchaka2014-08-121-1/+2
|
* Issue #21448: Fixed FeedParser feed() to avoid O(N**2) behavior when parsing ↵Serhiy Storchaka2014-08-121-4/+59
| | | | | | long line. Original patch by Raymond Hettinger.
* #20977: fix undefined name in the email module. Patch by Rose Ames.Ezio Melotti2014-08-041-0/+12
|
* Issue #22002: Make full use of test discovery in test sub-packages.Zachary Ware2014-07-232-21/+7
| | | | | | Adds `load_package_tests` function to test.support, uses it in test_asyncio, test_email, test_json, test_tools, test_importlib and all test_importlib sub-packages to implement test discovery.
* #21476: Unwrap fp in BytesParser so the file isn't unexpectedly closed.R David Murray2014-06-261-0/+25
| | | | This makes the behavior match that of Parser. Patch by Vajrasky Kok.
* #20871: improve email policy test coverage.R David Murray2014-03-091-0/+9
| | | | | | | | More tests of the concrete policy methods would probably be a good idea, but this is a start, and it brings line coverage up to 100% for the policy module. Patch by Milan Oberkirch.
* #11558: Better message if attach called on non-multipart.R David Murray2014-03-061-0/+8
| | | | Original patch by Varun Sharma.
* Merge: #14983: always add a line end after a MIME boundary marker.R David Murray2014-02-082-5/+11
|\
| * #14983: always add a line end after a MIME boundary marker.R David Murray2014-02-082-5/+11
| | | | | | | | | | | | | | | | | | This is more RFC compliant (see issue) and fixes a problem with signature verifiers rejecting the part when signed. There is some amount of backward compatibility concern here since it changes the output, but the RFC issue coupled with fixing the problem with signature verifiers seems worth the small risk of breaking code that depends on the current incorrect output.
* | Merge: #16983: Apply postel's law to encoded words inside quoted strings.R David Murray2014-02-082-0/+19
|\ \ | |/
| * #16983: Apply postel's law to encoded words inside quoted strings.R David Murray2014-02-082-0/+19
| | | | | | | | | | | | | | | | | | | | This applies only to the new parser. The old parser decodes encoded words inside quoted strings already, although it gets the whitespace wrong when it does so. This version of the patch only handles the most common case (a single encoded word surrounded by quotes), but I haven't seen any other variations of this in the wild yet, so its good enough for now.
* | Merge #19772: Do not mutate message when downcoding to 7bit.R David Murray2014-02-082-2/+12
|\ \ | |/
| * #19772: Do not mutate message when downcoding to 7bit.R David Murray2014-02-081-1/+11
| | | | | | | | | | | | | | | | | | This is a bit of an ugly hack because of the way generator pieces together the output message. The deepcopys aren't too expensive, though, because we know it is only called on messages that are not multiparts, and the payload (the thing that could be large) is an immutable object. Test and preliminary work on patch by Vajrasky Kok.
* | Merge: #17369: Improve handling of broken RFC2231 values in get_filename.R David Murray2014-02-071-0/+20
|\ \ | |/
| * #17369: Improve handling of broken RFC2231 values in get_filename.R David Murray2014-02-071-0/+20
| | | | | | | | This fixes a regression relative to python2.
* | #20531: Apply the 3.3 version of the #19063 fix.R David Murray2014-02-071-0/+32
| | | | | | | | | | So passing unicode to set_payload works again (but still doesn't do what you want when the message is serialized).
* | #20531: Revert e20f98a8ed71, the 3.4 version of the #19063 fix.R David Murray2014-02-072-42/+15
| |
* | #20476: use EmailMessage as factory if non-compat32 policy is used.R David Murray2014-02-071-1/+15
| | | | | | | | | | In 3.5 I will fix this right by adding a message_factory attribute to the policy.
* | Merge #20206, #5803: more efficient algorithm that doesn't truncate output.R David Murray2014-01-131-0/+5
|\ \ | |/ | | | | (No idea why test_tarfile is listed as changed...it isn't.)
| * #20206, #5803: more efficient algorithm that doesn't truncate output.R David Murray2014-01-131-0/+5
| | | | | | | | | | | | | | | | This fixes an edge case (20206) where if the input ended in a character needing encoding but there was no newline on the string, the last byte of the encoded character would be dropped. The fix is to use a more efficient algorithm, provided by Serhiy Storchaka (5803), that does not have the bug.
* | merge 3.3 (#19563)Benjamin Peterson2013-12-236-7/+7
|\ \ | |/
| * update Barry's email (#19563)Benjamin Peterson2013-12-236-7/+7
| |
| * #19063: partially fix set_payload handling of non-ASCII string input.R David Murray2013-12-111-0/+32
| | | | | | | | | | | | This is a backward compatible partial fix, the complete fix requires raising an error instead of accepting the invalid input, so the real fix is only suitable for 3.4.
* | #19957: Simplify encode_7or8bit now that _payload is always str.R David Murray2013-12-131-1/+8
| | | | | | | | Patch by Vajrasky Kok, test enhancement by me.
* | #19063: fix set_payload handling of non-ASCII string input.R David Murray2013-12-112-15/+42
| | | | | | | | | | This version of the fix raises an error instead of accepting the invalid input (ie: if a non-ASCII string is used but no charset is specified).
* | Issue #19590: Use specific asserts in email tests.Serhiy Storchaka2013-11-164-107/+92
|\ \ | |/
| * Issue #19590: Use specific asserts in email tests.Serhiy Storchaka2013-11-164-107/+92
| |
* | #18891: Complete new provisional email API.R David Murray2013-10-175-3/+1576
| | | | | | | | | | | | | | | | | | | | | | | | This adds EmailMessage and, MIMEPart subclasses of Message with new API methods, and a ContentManager class used by the new methods. Also a new policy setting, content_manager. Patch was reviewed by Stephen J. Turnbull and Serhiy Storchaka, and reflects their feedback. I will ideally add some examples of using the new API to the documentation before the final release.
* | Issue #12037: Fix test_email for desktop Windows.Terry Jan Reedy2013-08-311-4/+4
|\ \ | |/
| * Issue #12037: Fix test_email for desktop Windows.Terry Jan Reedy2013-08-311-2/+2
| |
* | Merge #18324: set_payload now correctly handles binary input.R David Murray2013-08-221-0/+36
|\ \ | |/
| * #18324: set_payload now correctly handles binary input.R David Murray2013-08-221-0/+36
| | | | | | | | | | | | | | | | | | | | | | This also backs out the previous fixes for for #14360, #1717, and #16564. Those bugs were actually caused by the fact that set_payload didn't decode to str, thus rendering the model inconsistent. This fix does mean the data processed by the encoder functions goes through an extra encode/decode cycle, but it means the model is always consistent. Future API updates will provide a better way to encode payloads, which will bypass this minor de-optimization. Tests by Vajrasky Kok.
* | #18741: merge with 3.3.Ezio Melotti2013-08-171-6/+6
|\ \ | |/
| * #18741: fix more typos. Patch by Févry Thibault.Ezio Melotti2013-08-171-6/+6
| |
* | #18505: merge with 3.3.Ezio Melotti2013-08-101-4/+1
|\ \ | |/
| * #18505: fix duplicate name and remove duplicate test. Patch by Vajrasky Kok.Ezio Melotti2013-08-101-4/+1
| |
* | #18600: add policy to add_string, and as_bytes and __bytes__ methods.R David Murray2013-08-091-3/+30
| | | | | | | | | | | | | | This was triggered by wanting to make the doctest in email.policy.rst pass; as_bytes and __bytes__ are clearly useful now that we have BytesGenerator. Also updated the Message docs to document the policy keyword that was added in 3.3.
* | #18503: small cleanups in test_email.R David Murray2013-07-251-2/+2
|\ \ | |/ | | | | Patch by Vajrasky Kok.
| * #18503: small cleanups in test_email.R David Murray2013-07-251-2/+2
| | | | | | | | Patch by Vajrasky Kok.
* | Merge: Closes #18475: add unittest.main() to test_email/test_inversions.R David Murray2013-07-161-0/+4
|\ \ | |/
| * Closes #18475: add unittest.main() to test_email/test_inversions.R David Murray2013-07-161-0/+4
| | | | | | | | Patch by Vajrasky Kok.