l.b.t.bug : module documentation

Part of lp.bugs.tests

Helper functions for bug-related doctests and pagetests.
Function print_direct_subscribers Print the direct subscribers listed in a portlet.
Function print_also_notified Print the structural and duplicate subscribers listed in a portlet.
Function print_subscribers Print the subscribers listed in the subscribers JSON portlet.
Function print_bug_affects_table Print information about all the bug tasks in the 'affects' table.
Function print_remote_bugtasks Print the remote bugtasks of this bug.
Function print_bugs_list Print the bugs list with the given ID.
Function print_bugtasks Print all the bugtasks in the text.
Function extract_bugtasks Extracts a list of strings for all the bugtasks in the text.
Function create_task_from_strings Create a task, optionally linked to a watch.
Function create_bug_from_strings Create and return a bug.
Function update_task_status Update a bugtask status.
Function create_old_bug Create an aged bug.
Function summarize_bugtasks Summarize a sequence of bugtasks.
Function print_upstream_linking_form Print the upstream linking form found via +choose-affected-product.
Function print_bugfilters_portlet_unfilled Print the raw, unfilled contents of the bugfilters portlet.
Function print_bugfilters_portlet_filled Print the filled-in contents of the bugfilters portlet.
Function print_ul Print the data from a list.
Function print_bug_tag_anchors The the bug tags in the iterable of anchors.
def print_direct_subscribers(bug_page):
Print the direct subscribers listed in a portlet.
def print_also_notified(bug_page):
Print the structural and duplicate subscribers listed in a portlet.
def print_subscribers(bug_page, subscription_level=None, reverse=False):
Print the subscribers listed in the subscribers JSON portlet.
def print_bug_affects_table(content, highlighted_only=False):
Print information about all the bug tasks in the 'affects' table.
Parametershighlighted_onlyOnly print the highlighted row
def print_remote_bugtasks(content):
Print the remote bugtasks of this bug.

For each remote bugtask, print the target and the bugwatch.

def print_bugs_list(content, list_id):
Print the bugs list with the given ID.

Right now this is quite simplistic, in that it just extracts the text from the element specified by list_id. If the bug listing becomes more elaborate then this function will be the place to cope with it.

def print_bugtasks(text, show_heat=None):
Print all the bugtasks in the text.
def extract_bugtasks(text, show_heat=None):
Extracts a list of strings for all the bugtasks in the text.
def create_task_from_strings(bug, owner, product, watchurl=None):
Create a task, optionally linked to a watch.
def create_bug_from_strings(distribution, sourcepackagename, owner, summary, description, status=None):
Create and return a bug.
def update_task_status(task_id, person, status):
Update a bugtask status.
def create_old_bug(title, days_old, target, status=BugTaskStatus.INCOMPLETE, with_message=True, external_bugtracker=None, assignee=None, milestone=None, duplicateof=None):
Create an aged bug.
Unknown Field: titleA string. The bug title for testing.
Unknown Field: days_oldAn int. The bug's age in days.
Unknown Field: targetA BugTarget. The bug's target.
Unknown Field: statusA BugTaskStatus. The status of the bug's single bugtask.
Unknown Field: with_messageA Bool. Whether to create a reply message.
Unknown Field: external_bugtrackerAn external bug tracker which is watched for this bug.
def summarize_bugtasks(bugtasks):
Summarize a sequence of bugtasks.
def print_upstream_linking_form(browser):
Print the upstream linking form found via +choose-affected-product.

The resulting output will look something like:
(*) A checked option
    [A related text field]
( ) An unchecked option
def print_bugfilters_portlet_unfilled(browser, target):
Print the raw, unfilled contents of the bugfilters portlet.

This is the contents before any actual data has been fetched.
(The portlet is normally populated with data by a separate
javascript call, to avoid delaying the overall page load.  Use
print_bugfilters_portlet_filled() to test the populated portlet.)

:param browser  browser from which to extract the content.
:param target   entity from whose bugs page to fetch the portlet
                (e.g., http://bugs.launchpad.test/TARGET/...)
def print_bugfilters_portlet_filled(browser, target):
Print the filled-in contents of the bugfilters portlet.

This is the contents after the actual data has been fetched.
(The portlet is normally populated with data by a separate
javascript call, to avoid delaying the overall page load.  Use
print_bugfilters_portlet_unfilled() to test the unpopulated
portlet.)

:param browser  browser from which to extract the content.
:param target   entity from whose bugs page to fetch the portlet
                (e.g., http://bugs.launchpad.test/TARGET/...)
def print_ul(ul):
Print the data from a list.
def print_bug_tag_anchors(anchors):
The the bug tags in the iterable of anchors.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.