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

Part of lp.code.model.tests.test_branchjob View In Hierarchy

Tests for RevisionsAddedJob.
Method test_create RevisionsAddedJob.create uses the correct values.
Method test_iterReady IterReady iterates through ready jobs.
Method updateDBRevisions Update the database for the revisions.
Method create3CommitsBranch Create a branch with three commits.
Method test_iterAddedMainline iterAddedMainline iterates through mainline revisions.
Method test_iterAddedNonMainline iterAddedMainline drops non-mainline revisions.
Method test_iterAddedMainline_order iterAddedMainline iterates in commit order.
Method makeBranchWithCommit Create a branch with a commit.
Method makeRevisionsAddedWithMergeCommit Create a RevisionsAdded job with a revision that is a merge.
Method test_getMergedRevisionIDs Ensure the correct revision ids are returned for a merge.
Method test_findRelatedBMP The related branch merge proposals can be identified.
Method test_findRelatedBMP_one_per_source findRelatedBMP only returns the most recent proposal for any
Method test_getAuthors Ensure getAuthors returns the authors for the revisions.
Method test_getAuthors_with_ghost getAuthors ignores ghosts when returning the authors.
Method test_getRevisionMessage getRevisionMessage provides a correctly-formatted message.
Method test_getRevisionMessage_with_merge_authors Merge authors are included after the main bzr log.
Method test_getRevisionMessage_with_merge_authors_and_authors Merge authors are separate from normal authors.
Method makeJobAndBMP Undocumented
Method test_getRevisionMessage_with_related_BMP Information about related proposals is displayed.
Method test_getRevisionMessage_with_related_superseded_BMP Superseded proposals are skipped.
Method test_getRevisionMessage_with_BMP_with_requested_review Information about incomplete reviews is omitted.
Method test_getRevisionMessage_with_related_rejected_BMP The reviewer is shown for non-approved proposals.
Method test_email_format Contents of the email are as expected.
Method test_message_encoding Test handling of non-ASCII commit messages.
Method test_getMailerForRevision The mailer for the revision is as expected.
Method test_only_nodiff_subscribers_means_no_diff_generated No diff is generated when no subscribers need it.

Inherited from TestCaseWithFactory:

Method setUp Undocumented
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 test_create(self):
RevisionsAddedJob.create uses the correct values.
def test_iterReady(self):
IterReady iterates through ready jobs.
def updateDBRevisions(self, branch, bzr_branch, revision_ids):
Update the database for the revisions.
ParametersbranchThe database branch associated with the revisions.
bzr_branchThe Bazaar branch associated with the revisions.
revision_idsThe ids of the revisions to update. If not supplied, the branch revision history is used.
def create3CommitsBranch(self):
Create a branch with three commits.
def test_iterAddedMainline(self):
iterAddedMainline iterates through mainline revisions.
def test_iterAddedNonMainline(self):
iterAddedMainline drops non-mainline revisions.
def test_iterAddedMainline_order(self):
iterAddedMainline iterates in commit order.
def makeBranchWithCommit(self):
Create a branch with a commit.
def makeRevisionsAddedWithMergeCommit(self, authors=None, include_ghost=False):
Create a RevisionsAdded job with a revision that is a merge.

:param authors: If specified, the list of authors of the commit
    that merges the others.
:param include_ghost:If true, add revision 2c as a ghost revision.
def test_getMergedRevisionIDs(self):
Ensure the correct revision ids are returned for a merge.
def test_findRelatedBMP(self):
The related branch merge proposals can be identified.
def test_findRelatedBMP_one_per_source(self):
findRelatedBMP only returns the most recent proposal for any particular source branch.
def test_getAuthors(self):
Ensure getAuthors returns the authors for the revisions.
def test_getAuthors_with_ghost(self):
getAuthors ignores ghosts when returning the authors.
def test_getRevisionMessage(self):
getRevisionMessage provides a correctly-formatted message.
def test_getRevisionMessage_with_merge_authors(self):
Merge authors are included after the main bzr log.
def test_getRevisionMessage_with_merge_authors_and_authors(self):
Merge authors are separate from normal authors.
def makeJobAndBMP(self):
Undocumented
def test_getRevisionMessage_with_related_BMP(self):
Information about related proposals is displayed.
def test_getRevisionMessage_with_related_superseded_BMP(self):
Superseded proposals are skipped.
def test_getRevisionMessage_with_BMP_with_requested_review(self):
Information about incomplete reviews is omitted.

If there is a related branch merge proposal, and it has requested reviews which have not been completed, they are ignored.

def test_getRevisionMessage_with_related_rejected_BMP(self):
The reviewer is shown for non-approved proposals.
def test_email_format(self):
Contents of the email are as expected.
def test_message_encoding(self):
Test handling of non-ASCII commit messages.
def test_getMailerForRevision(self):
The mailer for the revision is as expected.
def test_only_nodiff_subscribers_means_no_diff_generated(self):
No diff is generated when no subscribers need it.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.