l.s.m.t.t.TestMailController(TestCase) : class documentation

Part of lp.services.mail.tests.test_sendmail View In Hierarchy

No class docstring
Method test_constructor Test the default construction behaviour.
Method test_constructor2 Test the explicit construction behaviour.
Method test_long_subject_wrapping Undocumented
Method test_addAttachment addAttachment should add a part to the list of attachments.
Method test_MakeMessageSpecialChars A message should have its to and from addrs converted to ascii.
Method test_MakeMessage_long_address Undocumented
Method test_MakeMessage_no_attachment A message without an attachment should have a single body.
Method test_MakeMessage_unicode_body Undocumented
Method test_MakeMessage_unicode_body_with_attachment Undocumented
Method test_MakeMessage_with_binary_attachment Message should still encode as ascii with non-ascii attachments.
Method test_MakeMessage_with_non_binary_attachment Simple ascii attachments should not be encoded.
Method test_MakeMessage_with_attachment A message with an attachment should be multipart.
Method test_MakeMessage_with_specific_attachment Explicit attachment params should be obeyed.
Method test_encodeOptimally_with_ascii_text Mostly-ascii attachments should be encoded as quoted-printable.
Method test_encodeOptimally_with_7_bit_binary Mostly-ascii attachments should be encoded as quoted-printable.
Method test_encodeOptimally_with_text Mostly-ascii attachments should be encoded as quoted-printable.
Method test_encodeOptimally_with_binary Significantly non-ascii attachments should be base64-encoded.
Method test_sendUsesRealTo MailController.envelope_to is provided as to_addrs.
Method test_MailController_into_timeline sendmail records stuff in the timeline.
Method test_sendmail_with_email_header Check the timeline is ok even if there is an email.header.Header.
Method checkTimelineHasOneMailAction Undocumented

Inherited from TestCase:

Method becomeDbUser Commit, then log into the database as dbuser.
Method __str__ The string representation of a test is its id.
Method useContext Use the supplied context in this test.
Method makeTemporaryDirectory Create a temporary directory, and return its path.
Method installKarmaRecorder Set up and return a KarmaRecorder.
Method assertProvides Assert 'obj' correctly provides 'interface'.
Method assertNotifies Assert that a callable performs a given notification.
Method assertNoNotification Assert that no notifications are generated by the callable.
Method assertSqlAttributeEqualsDate Fail unless the value of the attribute is equal to the date.
Method assertTextMatchesExpressionIgnoreWhitespace Undocumented
Method assertIsInstance Assert that an instance is an instance of assert_class.
Method assertIsNot Assert that expected is not the same object as observed.
Method assertContentEqual Assert that 'iter1' has the same content as 'iter2'.
Method assertRaisesWithContent Check if the given exception is raised with given content.
Method assertBetween Assert that 'variable' is strictly between two boundaries.
Method assertVectorEqual Apply assertEqual to all given pairs in one go.
Method expectedLog Expect a log to be written that matches the regex.
Method pushConfig Push some key-value pairs into a section of the config.
Method attachOopses Undocumented
Method attachLibrarianLog Include the logChunks from fixture in the test details.
Method setUp Undocumented
Method assertStatementCount Assert that the expected number of SQL statements occurred.
Method useTempDir Use a temporary directory for this test.
Method assertEmailHeadersEqual Assert that two email headers are equal.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method checkPermissions Check if the used_permissions match expected_permissions.
Method assertEmailQueueLength Pop the email queue, assert its length, and return it.
Method _unfoldEmailHeader Unfold a multiline email header.
def test_constructor(self):
Test the default construction behaviour.

Defaults should be empty. The 'to' should be converted to a list.

def test_constructor2(self):
Test the explicit construction behaviour.

Since to is a list, it is not converted into a list.

def test_long_subject_wrapping(self):
Undocumented
def test_addAttachment(self):
addAttachment should add a part to the list of attachments.
def test_MakeMessageSpecialChars(self):
A message should have its to and from addrs converted to ascii.
def test_MakeMessage_long_address(self):
Undocumented
def test_MakeMessage_no_attachment(self):
A message without an attachment should have a single body.
def test_MakeMessage_unicode_body(self):
Undocumented
def test_MakeMessage_unicode_body_with_attachment(self):
Undocumented
def test_MakeMessage_with_binary_attachment(self):
Message should still encode as ascii with non-ascii attachments.
def test_MakeMessage_with_non_binary_attachment(self):
Simple ascii attachments should not be encoded.
def test_MakeMessage_with_attachment(self):
A message with an attachment should be multipart.
def test_MakeMessage_with_specific_attachment(self):
Explicit attachment params should be obeyed.
def test_encodeOptimally_with_ascii_text(self):
Mostly-ascii attachments should be encoded as quoted-printable.
def test_encodeOptimally_with_7_bit_binary(self):
Mostly-ascii attachments should be encoded as quoted-printable.
def test_encodeOptimally_with_text(self):
Mostly-ascii attachments should be encoded as quoted-printable.
def test_encodeOptimally_with_binary(self):
Significantly non-ascii attachments should be base64-encoded.
def test_sendUsesRealTo(self):
MailController.envelope_to is provided as to_addrs.
def test_MailController_into_timeline(self):
sendmail records stuff in the timeline.
def test_sendmail_with_email_header(self):
Check the timeline is ok even if there is an email.header.Header.

See https://bugs.launchpad.net/launchpad/+bug/885972

def checkTimelineHasOneMailAction(self, timeline, subject):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.