l.b.m.t.t.TestMaloneHandler(TestCaseWithFactory) : class documentation

Part of lp.bugs.mail.tests.test_handler View In Hierarchy

Test that the Malone/bugs handler works.
Method setUp Undocumented
Method tearDown Undocumented
Method test_getCommandsEmpty getCommands returns an empty list for messages with no command.
Method test_getCommandsBug getCommands returns a reasonable list if commands are specified.
Method test_NonGPGAuthenticatedNewBug Mail authenticated other than by gpg can create bugs.
Method test_mailToHelpFromNonActiveUser Mail from people without a preferred email get a help message.
Method test_mailToHelpFromUnknownUser Mail from people of no account to help@ is simply dropped.
Method test_mailToHelp Mail to help@ generates a help command.
Method getFailureForMessage Undocumented
Method test_new_bug_big_body Undocumented
Method test_bug_not_found Undocumented
Method test_accessible_private_bug Undocumented
Method test_inaccessible_private_bug_not_found Undocumented

Inherited from TestCaseWithFactory:

Method getUserBrowser Return a Browser logged in as a fresh user, maybe opened at url.
Method getNonRedirectingBrowser Undocumented
Method createBranchAtURL Create a branch at the supplied URL.
Method create_branch_and_tree Create a database branch, bzr branch and bzr checkout.
Method createBzrBranch Create a bzr branch for a database branch.
Static Method getBranchPath Return the path of the branch in the mirrored area.
Method useTempBzrHome Undocumented
Method useBzrBranches Prepare for using bzr branches.

Inherited from TestCase (via TestCaseWithFactory):

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 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 setUp(self):
Undocumented
def tearDown(self):
Undocumented
def test_getCommandsEmpty(self):
getCommands returns an empty list for messages with no command.
def test_getCommandsBug(self):
getCommands returns a reasonable list if commands are specified.
def test_NonGPGAuthenticatedNewBug(self):
Mail authenticated other than by gpg can create bugs.

The incoming mail layer is responsible for authenticating the mail, and setting the current principal to the sender of the mail, either weakly or non-weakly authenticated. At the layer of the handler, which this class is testing, we shouldn't care by what mechanism we decided to act on behalf of the mail sender, only that we did.

In bug 643219, Launchpad had a problem where the MaloneHandler code was puncturing that abstraction and directly looking at the GPG signature; this test checks it's fixed.

def test_mailToHelpFromNonActiveUser(self):
Mail from people without a preferred email get a help message.
def test_mailToHelpFromUnknownUser(self):
Mail from people of no account to help@ is simply dropped.
def test_mailToHelp(self):
Mail to help@ generates a help command.
def getFailureForMessage(self, to_address, from_address=None, body=None):
Undocumented
def test_new_bug_big_body(self):
Undocumented
def test_bug_not_found(self):
Undocumented
def test_accessible_private_bug(self):
Undocumented
def test_inaccessible_private_bug_not_found(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.