l.s.t.t.SoyuzTestPublisher : class documentation

Part of lp.soyuz.tests.test_publishing View In Hierarchy

Known subclasses: lp.soyuz.tests.test_publishing.TestNativePublishingBase

Helper class able to publish coherent source and binaries in Soyuz.
Method __init__ Undocumented
Method setUpDefaultDistroSeries Set up a distroseries that will be used by default.
Method prepareBreezyAutotest Prepare ubuntutest/breezy-autotest for publications.
Method addFakeChroots Add fake chroots for all the architectures in distroseries.
Method regetBreezyAutotest Undocumented
Method addMockFile Add a mock file in Librarian.
Method addPackageUpload Undocumented
Method getPubSource Return a mock source publishing record.
Method getPubBinaries Return a list of binary publishing records.
Method uploadBinaryForBuild Return the corresponding BinaryPackageRelease.
Method publishBinaryInArchive Return the corresponding BinaryPackagePublishingHistory.
Method createSource Create source with meaningful '.changes' file.
Method makeSourcePackageSummaryData Make test data for SourcePackage.summary.
Method updatePackageCache Undocumented
Method _findChangesFile File with given name fragment in directory tree starting at top.
def __init__(self):
Undocumented
def setUpDefaultDistroSeries(self, distroseries=None):
Set up a distroseries that will be used by default.

This distro series is used to publish packages in, if you don't specify any when using the publishing methods.

It also sets up a person that can act as the default uploader, and makes sure that the default package name exists in the database.

ParametersdistroseriesThe IDistroSeries to use as default. If it's None, one will be created.
ReturnsThe IDistroSeries that got set as default.
def prepareBreezyAutotest(self):
Prepare ubuntutest/breezy-autotest for publications.

It's also called during the normal test-case setUp.

def addFakeChroots(self, distroseries=None, db_only=False):
Add fake chroots for all the architectures in distroseries.
def regetBreezyAutotest(self):
Undocumented
def addMockFile(self, filename, filecontent='nothing', restricted=False):
Add a mock file in Librarian.

Returns a ILibraryFileAlias corresponding to the file uploaded.

def addPackageUpload(self, archive, distroseries, pocket=PackagePublishingPocket.RELEASE, changes_file_name='foo_666_source.changes', changes_file_content='fake changes file content', upload_status=PackageUploadStatus.DONE):
Undocumented
def getPubSource(self, sourcename=None, version=None, component='main', filename=None, section='base', filecontent='I do not care about sources.', changes_file_content='Fake: fake changes file content', status=PackagePublishingStatus.PENDING, pocket=PackagePublishingPocket.RELEASE, urgency=SourcePackageUrgency.LOW, scheduleddeletiondate=None, dateremoved=None, distroseries=None, archive=None, builddepends=None, builddependsindep=None, architecturehintlist='all', dsc_standards_version='3.6.2', dsc_format='1.0', dsc_binaries='foo-bin', build_conflicts=None, build_conflicts_indep=None, dsc_maintainer_rfc822='Foo Bar <foo@bar.com>', maintainer=None, creator=None, date_uploaded=UTC_NOW, spr_only=False, user_defined_fields=None):
Return a mock source publishing record.

if spr_only is specified, the source is not published and the sourcepackagerelease object is returned instead.

def getPubBinaries(self, binaryname='foo-bin', summary='Foo app is great', description='Well ...\nit does nothing, though', shlibdep=None, depends=None, recommends=None, suggests=None, conflicts=None, replaces=None, provides=None, pre_depends=None, enhances=None, breaks=None, filecontent='bbbiiinnnaaarrryyy', changes_file_content='Fake: fake changes file', status=PackagePublishingStatus.PENDING, pocket=PackagePublishingPocket.RELEASE, format=BinaryPackageFormat.DEB, scheduleddeletiondate=None, dateremoved=None, distroseries=None, archive=None, pub_source=None, version=None, architecturespecific=False, builder=None, component='main', phased_update_percentage=None, with_debug=False, user_defined_fields=None):
Return a list of binary publishing records.
def uploadBinaryForBuild(self, build, binaryname, filecontent='anything', summary='summary', description='description', shlibdep=None, depends=None, recommends=None, suggests=None, conflicts=None, replaces=None, provides=None, pre_depends=None, enhances=None, breaks=None, format=BinaryPackageFormat.DEB, debug_package=None, user_defined_fields=None, homepage=None, version=None):
Return the corresponding BinaryPackageRelease.
def publishBinaryInArchive(self, binarypackagerelease, archive, status=PackagePublishingStatus.PENDING, pocket=PackagePublishingPocket.RELEASE, scheduleddeletiondate=None, dateremoved=None, phased_update_percentage=None):
Return the corresponding BinaryPackagePublishingHistory.
def _findChangesFile(self, top, name_fragment):
File with given name fragment in directory tree starting at top.
def createSource(self, archive, sourcename, version, distroseries=None, new_version=None):
Create source with meaningful '.changes' file.
def makeSourcePackageSummaryData(self, source_pub=None):
Make test data for SourcePackage.summary.

The distroseries that is returned from this method needs to be passed into updatePackageCache() so that SourcePackage.summary can be populated.

def updatePackageCache(self, distroseries):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2019-08-22 00:00:19.