Improve testing infrastructure reusability for the web API.
Review Request #5607 — Created March 10, 2014 and submitted
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 settingtest_local_sites = False
, this
will be turned off.Along with this,
create_repository()
can now accept alocal_site=
parameter, and subclasses ofBaseWebAPITestCase
can now override the
mimetype for expected errors.
RB unit tests pass.
Used this in another set of tests, and they worked as well.