From 4d79bdaf80b67360017a04e1f20a0c5a28d01240 Mon Sep 17 00:00:00 2001 From: Jose Manuel Delicado Date: Fri, 6 Oct 2017 15:31:31 +0200 Subject: [PATCH] Commented the function test_request_should_raise_exception_with_invalid_json. Twitter also works with non-json data --- tests/test_core.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_core.py b/tests/test_core.py index b824f86..a7cb81c 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -213,14 +213,14 @@ class TwythonAPITestCase(unittest.TestCase): self.assertEqual({'id': 210462857140252672}, data) - @responses.activate - def test_request_should_raise_exception_with_invalid_json(self): - """Test that Twython handles invalid JSON (though Twitter should not return it)""" - endpoint = 'statuses/show' - url = self.get_url(endpoint) - self.register_response(responses.GET, url, body='{"id: 210462857140252672}') + #@responses.activate + #def test_request_should_raise_exception_with_invalid_json(self): + #"""Test that Twython handles invalid JSON (though Twitter should not return it)""" + #endpoint = 'statuses/show' + #url = self.get_url(endpoint) + #self.register_response(responses.GET, url, body='{"id: 210462857140252672}') - self.assertRaises(TwythonError, self.api.request, endpoint, params={'id': 210462857140252672}) + #self.assertRaises(TwythonError, self.api.request, endpoint, params={'id': 210462857140252672}) @responses.activate def test_request_should_handle_401(self):