l.c.m.t.t.TestCodeHandler(TestCaseWithFactory) : class documentation

Part of lp.code.mail.tests.test_codehandler View In Hierarchy

Test the code email hander.
Method setUp Undocumented
Method tearDown Undocumented
Method test_get Undocumented
Method test_process Processing an email creates an appropriate CodeReviewComment.
Method test_process_packagebranch Processing an email related to a package branch works..
Method test_process_git Processing an email related to a Git-based merge proposal works.
Method test_processBadAddress When a bad address is supplied, it returns False.
Method test_processNonExistantAddress When a non-existant address is supplied, it returns False.
Method test_processBadVote process handles bad votes properly.
Method test_getReplyAddress getReplyAddress should return From or Reply-to address.
Method test_process_for_imported_branch Make sure that the database user is able refer to import branches.
Method test_processVote Process respects the vote command.
Method test_processVoteColon Process respects the vote: command.
Method test_processReview Process respects the review command.
Method test_processReviewColon Process respects the review: command.
Method test_processWithExistingVote Process respects the vote command.
Method test_processmail_generates_job Processing mail causes an email job to be created.
Method test_getBranchMergeProposal The correct BranchMergeProposal is returned for the address.
Method test_getBranchMergeProposalInvalid InvalidBranchMergeProposalAddress is raised if appropriate.
Method test_processWithMergeDirectiveEmail process errors if merge@ address used.
Method test_reviewer_with_diff Requesting a review with a diff works.
Method test_processMissingSubject If the subject is missing, the user is warned by email.
Method test_notifies_modification Changes to the merge proposal itself trigger events.

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_get(self):
Undocumented
def test_process(self):
Processing an email creates an appropriate CodeReviewComment.
def test_process_packagebranch(self):
Processing an email related to a package branch works..
def test_process_git(self):
Processing an email related to a Git-based merge proposal works.
def test_processBadAddress(self):
When a bad address is supplied, it returns False.
def test_processNonExistantAddress(self):
When a non-existant address is supplied, it returns False.
def test_processBadVote(self):
process handles bad votes properly.
def test_getReplyAddress(self):
getReplyAddress should return From or Reply-to address.
def test_process_for_imported_branch(self):
Make sure that the database user is able refer to import branches.

Import branches have different permission checks than other branches.

Permission to mark a merge proposal as approved checks launchpad.Edit of the target branch, or membership of the review team on the target branch. For import branches launchpad.Edit also checks the registrant of the code import if there is one, and membership of vcs-imports. So if someone is attempting to review something on an import branch, but they don't have launchpad.Edit but are a member of the review team, then a check against the code import is done.

def test_processVote(self):
Process respects the vote command.
def test_processVoteColon(self):
Process respects the vote: command.
def test_processReview(self):
Process respects the review command.
def test_processReviewColon(self):
Process respects the review: command.
def test_processWithExistingVote(self):
Process respects the vote command.
def test_processmail_generates_job(self):
Processing mail causes an email job to be created.
def test_getBranchMergeProposal(self):
The correct BranchMergeProposal is returned for the address.
def test_getBranchMergeProposalInvalid(self):
InvalidBranchMergeProposalAddress is raised if appropriate.
def test_processWithMergeDirectiveEmail(self):
process errors if merge@ address used.
def test_reviewer_with_diff(self):
Requesting a review with a diff works.
def test_processMissingSubject(self):
If the subject is missing, the user is warned by email.
def test_notifies_modification(self):
Changes to the merge proposal itself trigger events.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.