Test that Twython raises an auth error on 401 error
(self)
| 219 | |
| 220 | @responses.activate |
| 221 | def test_request_should_handle_401(self): |
| 222 | """Test that Twython raises an auth error on 401 error""" |
| 223 | endpoint = 'statuses/home_timeline' |
| 224 | url = self.get_url(endpoint) |
| 225 | self.register_response(responses.GET, url, body='{"errors":[{"message":"Error"}]}', status=401) |
| 226 | |
| 227 | self.assertRaises(TwythonAuthError, self.api.request, endpoint) |
| 228 | |
| 229 | @responses.activate |
| 230 | def test_request_should_handle_400_for_missing_auth_data(self): |
nothing calls this directly
no test coverage detected