MCPcopy Index your code
hub / github.com/ryanmcgrath/twython / test_post_uses_post_method

Method test_post_uses_post_method

tests/test_core.py:182–191  ·  view source on GitHub ↗

Test Twython generic POST request works

(self)

Source from the content-addressed store, hash-verified

180
181 @responses.activate
182 def test_post_uses_post_method(self):
183 """Test Twython generic POST request works"""
184 endpoint = 'statuses/update'
185 url = self.get_url(endpoint)
186 self.register_response(responses.POST, url)
187
188 self.api.post(endpoint, params={'status': 'I love Twython!'})
189
190 self.assertEqual(1, len(responses.calls))
191 self.assertEqual(url, responses.calls[0].request.url)
192
193 def test_raise_twython_error_on_request_exception(self):
194 """Test if TwythonError is raised by a RequestException"""

Callers

nothing calls this directly

Calls 3

get_urlMethod · 0.95
register_responseMethod · 0.95
postMethod · 0.80

Tested by

no test coverage detected