Improve testing infrastructure reusability for the web API.

Review Request #5607 — Created March 10, 2014 and submitted — Latest diff uploaded

Information

Review Board
master
7f87867...

Reviewers

The testing infrastructure was fine for the Review Board API tests, but
wasn't as nice to work with for anything else that wanted to reuse the
test infrastructure. In particular, the assumption was made that all
APIs can be bound to a Local Site, but this isn't always true.

This assumption has been removed. The default is still to test APIs
against a Local Site, but by setting test_local_sites = False, this
will be turned off.

Along with this, create_repository() can now accept a local_site=
parameter, and subclasses of BaseWebAPITestCase can now override the
mimetype for expected errors.

RB unit tests pass.

Used this in another set of tests, and they worked as well.