• 
      

    Make the WebAPI feature tests more robust

    Review Request #9130 — Created Aug. 9, 2017 and submitted — Latest diff uploaded

    Information

    Review Board
    release-3.0.x

    Reviewers

    Some time in the past the WebAPI feature tests started logging errors
    due to missing the _local_site_name key on the request. This was due
    do the request not going through all the middleware; instead, we were
    putting it through a selection of middleware -- just enough for the
    tests to pass.

    We were doing this because the test resource is not available in the URL
    conf we give to Django (as it is temporary and for testing). Now, we
    generate a URL conf for each test as we are running it and pass that to
    Django instead. That way, all the requests can go through the test
    client, which will put them through middleware we use.

    In addition I've rewritten the language in the specified test to outline
    what exactly the feature and resource are doing: they are for testing
    and hence should be called TestingFeature, TestingResource, etc.

    Ran unit tests.