l.t.f.ObjectFactory : class documentation

Part of lp.testing.factory View In Hierarchy

Known subclasses: lp.codehosting.inmemory.FakeObjectFactory, lp.testing.factory.BareLaunchpadObjectFactory

Factory methods for creating basic Python objects.
Method getUniqueEmailAddress Undocumented
Method getUniqueInteger Return an integer unique to this factory instance.
Method getUniqueHexString Return a unique hexadecimal string.
Method getUniqueString Return a string unique to this factory instance.
Method getUniqueUnicode Undocumented
Method getUniqueURL Return a URL unique to this run of the test case.
Method getUniqueDate Return a unique date since January 1 2009.
Method makeCodeImportSourceDetails Undocumented
def getUniqueEmailAddress(self):
Undocumented
def getUniqueInteger(self):
Return an integer unique to this factory instance.

For each thread, this will be a series of increasing numbers, but the starting point will be unique per thread.

def getUniqueHexString(self, digits=None):
Return a unique hexadecimal string.
ParametersdigitsThe number of digits in the string. 'None' means you don't care.
ReturnsA hexadecimal string, with 'a'-'f' in lower case.
def getUniqueString(self, prefix=None):
Return a string unique to this factory instance.

The string returned will always be a valid name that can be used in Launchpad URLs.

ParametersprefixUsed as a prefix for the unique string. If unspecified, generates a name starting with 'unique' and mentioning the calling source location.
def getUniqueUnicode(self, prefix=None):
Undocumented
def getUniqueURL(self, scheme=None, host=None):
Return a URL unique to this run of the test case.
def getUniqueDate(self):
Return a unique date since January 1 2009.

Each date returned by this function will more recent (or further into the future) than the previous one.

def makeCodeImportSourceDetails(self, target_id=None, rcstype=None, target_rcstype=None, url=None, cvs_root=None, cvs_module=None, stacked_on_url=None, macaroon=None):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.