'Make sure that the specified method rejects access by unauthorized users.'

def check_anonymous_request_rejected(self, method):

    anonymous_client = APIClient()
    request_method = getattr(anonymous_client, method)
    response = request_method(self.url)
    self.check_response(response, 401)
    self.assert_no_events_were_emitted()
