'Verify the endpoint supports OAuth, and only allows authorization for staff users.'

def test_oauth(self):

    user = UserFactory(is_staff=False)
    oauth_client = ClientFactory.create()
    access_token = AccessTokenFactory.create(user=user, client=oauth_client).token
    headers = {u'HTTP_AUTHORIZATION': (u'Bearer    ' + access_token)}
    response = self.client.get(self.path, **headers)
    self.assertEqual(response.status_code, 403)
    user.is_staff = True
    user.save()
    response = self.client.get(self.path, **headers)
    self.assertEqual(response.status_code, 200)
