l.a.t.t.TestSyncNotification(TestCaseWithFactory) : class documentation

Part of lp.archiveuploader.tests.test_sync_notification View In Hierarchy

No class docstring
Method makePersonWithEmail Create a person; return (person, email).
Method makeSPPH Create a SourcePackagePublishingHistory.
Method makeUploader Grant a person upload privileges for archive/component.
Method syncSource Sync spph into target_distroseries.
Method makeChangesFile Undocumented
Method makeNascentUpload Create a NascentUpload for spph.
Method processAndRejectUpload Undocumented
Method getNotifiedAddresses Get email addresses that were notified.
Method test_failed_copy_builds_do_not_spam_upstream Failed builds do not spam people who are not responsible for them.

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 makePersonWithEmail(self):
Create a person; return (person, email).
def makeSPPH(self, distroseries, maintainer_address):
Create a SourcePackagePublishingHistory.
def makeUploader(self, person, archive, component):
Grant a person upload privileges for archive/component.
def syncSource(self, spph, target_distroseries, requester):
Sync spph into target_distroseries.
def makeChangesFile(self, spph, maintainer, maintainer_address, changer, changer_address):
def makeNascentUpload(self, spph, maintainer, maintainer_address, changer, changer_address):
Create a NascentUpload for spph.
def processAndRejectUpload(self, nascent_upload):
def getNotifiedAddresses(self):
Get email addresses that were notified.
def test_failed_copy_builds_do_not_spam_upstream(self):
Failed builds do not spam people who are not responsible for them.

We import Debian source packages, then sync them into Ubuntu (and from there, into Ubuntu-derived distros). Those syncs then trigger builds that the original Debian maintainers and last-change authors are not responsible for.

In a situation like that, we should not bother those people with the failure. We notify the person who requested the sync instead.

(The logic in lp.soyuz.mail.packageupload may still notify the author of the last change, if that person is also an uploader for the archive that the failure happened in. For this particular situation we consider that not so much an intended behaviour, as an emergent one that does not seem inappropriate. It'd be hard to change if we wanted to.)

This test guards against bug 876594.

API Documentation for Launchpad, generated by pydoctor at 2020-12-02 00:00:02.