Decorators Usage Guide

The decorators module

attr(**kwargs)[source]

A decorator which applies the testtools attr decorator

This decorator applies the testtools.testcase.attr if it is in the list of attributes to testtools we want to apply.

idempotent_id(id)[source]

Stub for metadata decorator

related_bug(bug, status_code=None)[source]

A decorator useful to know solutions from launchpad bug reports

@param bug: The launchpad bug number causing the test @param status_code: The status code related to the bug report

skip_because(*args, **kwargs)[source]

A decorator useful to skip tests hitting known bugs

@param bug: bug number causing the test to skip @param condition: optional condition to be True for the skip to have place

class skip_unless_attr[source]

Decorator to skip tests if a specified attr does not exists or False