Add new support for easily testing Review Board extensions.

Review Request #8295 — Created July 19, 2016 and submitted — Latest diff uploaded

Information

Review Board
release-3.0.x
3b58b9f...

Reviewers

This introduces a new TestCase class and a command line tool for easily
unit testing Review Board extensions.

The new ExtensionTestCase can be used by extension authors to create
unit tests that make use of an enabled instance of the extension. This
makes use of Djblets's new testing support, and also allows for the
usage of the handy object creation methods we have in Review Board's
main TestCase class.

A new rbext test command is now provided, which makes it easy to run
an extension's test suite. This works similarly to other test runners
like nosetests, but sets up a suitable Review Board environment in which
to run the tests.

To make that work well, and to consolidate code, the main Review Board
test runner now makes use of Djblets's new TestRunner class. This means
that both Review Board and any extensions will be running in the same
kind of environment.

Documentation has been added describing how to make use of all this to
write and run test suites.

Ran the Review Board test suite.

Updated an extension to use ExtensionTestCase, and then ran the
test suite using rbext test. I also tried a variety of other
options (built-in and through nosetests), and tried running
subsets of tests. All worked.

Read through the new docs and verified that the formatting and
linking was all correct.