l.c.t.helpers : module documentation

Part of lp.code.tests

Helper functions for code testing live here.
Function mark_all_merge_proposal_jobs_done Sometimes in tests we want to clear out all pending jobs.
Function add_revision_to_branch Add a new revision to the branch with the specified revision date.
Function make_erics_fooix_project Make Eric, the Fooix project, and some branches.
Function make_linked_package_branch Make a new package branch and make it official.
Function consistent_branch_names Provide a generator for getting consistent branch names.
Function make_package_branches Make some package branches.
Function make_official_package_branch Make a branch linked to the pocket of a source package.
Function make_project_branch_with_revisions Make a new branch with revisions.
Function make_project_cloud_data Make test data to populate the project cloud.
Function recipe_parser_newest_version Undocumented
Function make_merge_proposal_without_reviewers Make a merge proposal and strip of any review votes.
Function get_non_existant_source_package_branch_unique_name Return the unique name for a non-existanct source package branch.
Function remove_all_sample_data_branches Undocumented
Class BranchHostingFixture A fixture that temporarily registers a fake Bazaar hosting client.
Class GitHostingFixture A fixture that temporarily registers a fake Git hosting client.
def mark_all_merge_proposal_jobs_done():
Sometimes in tests we want to clear out all pending jobs.

This function iterates through all the pending jobs and marks the done.

def add_revision_to_branch(factory, branch, revision_date, date_created=None, mainline=True, commit_msg=None):
Add a new revision to the branch with the specified revision date.

If date_created is None, it gets set to the revision_date.

def make_erics_fooix_project(factory):
Make Eric, the Fooix project, and some branches.
Returnsa dict of objects to put into local scope.
def make_linked_package_branch(factory, distribution=None, sourcepackagename=None):
Make a new package branch and make it official.
def consistent_branch_names():
Provide a generator for getting consistent branch names.

This generator does not finish!

def make_package_branches(factory, series, sourcepackagename, branch_count, official_count=0, owner=None, registrant=None):
Make some package branches.

Make branch_count branches, and make official_count of those official branches.

def make_official_package_branch(factory, owner=None):
Make a branch linked to the pocket of a source package.
def make_project_branch_with_revisions(factory, date_generator, product=None, private=None, revision_count=None):
Make a new branch with revisions.
def make_project_cloud_data(factory, details):

Make test data to populate the project cloud.

Details is a list of tuples containing:
(project-name, num_commits, num_authors, last_commit)
@contextmanager
def recipe_parser_newest_version(version):
Undocumented
def make_merge_proposal_without_reviewers(factory, **kwargs):
Make a merge proposal and strip of any review votes.
def get_non_existant_source_package_branch_unique_name(owner, factory):
Return the unique name for a non-existanct source package branch.

Neither the branch nor the source package name will exist.

def remove_all_sample_data_branches():
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.