Fix API token unit tests.

Several API tests were failing because the proposed token policies were missing
a "resources" field. I've added this to the tests, and refactored the common
data out so that if we want to make any changes to the policy string, it's only
in one place.

Testing done: Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/6213/