Fix OAuth API tests and add some helpful logging for the future.

Review Request #9109 - Created July 28, 2017 and submitted

David Trowbridge
Review Board

The OAuth token resource tests were failing because the feature isn't yet
enabled by default. This change adds the necessary feature check override to
the tests (to ensure that it's enabled before calling it), and adds some
logging so that if we encounter this situation in the future, we'll see some
useful output instead of having to trace through the code to find out where the
PERMISSION_DENIED is coming from.

Ran unit tests.

Barret Rennie
David Trowbridge
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (8397048)