~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 2625.6.1.

  • Committer: Adeodato Simó
  • Date: 2007-07-18 15:51:52 UTC
  • mto: (2639.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2640.
  • Revision ID: dato@net.com.org.es-20070718155152-pv6rwq41eckqyxem
New EmailMessage class, façade around email.Message and MIMEMultipart.

* bzrlib/email_message.py,
  bzrlib/tests/test_email_message.py:
  New files.

* bzrlib/tests/__init__.py:
  (test_suite): add bzrlib.tests.test_email_message.

* bzrlib/merge_directive.py:
  (MergeDirective.to_email): Use EmailMessage instead of email.Message.

* bzrlib/tests/test_merge_directive.py,
  bzrlib/tests/blackbox/test_merge_directive.py:
  (__main__): adjust EMAIL1 and EMAIL2 strings to how EmailMessage
  formats itself.

* bzrlib/smtp_connection.py:
  (SMTPConnection.get_message_addresses): do not use methods present in
  email.Message but not in EmailMessage (get_all). Use get() instead of
  __getitem__ to make explicit that None is returned if the header does
  not exist.

* bzrlib/tests/test_smtp_connection.py:
  (TestSMTPConnection.test_get_message_addresses, 
   TestSMTPConnection.test_destination_address_required): test the
   functions against EmailMessage in addition to email.Message.

* NEWS:
  Mention EmailMessage in INTERNALS.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: