Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6
python-oauth2
oauth2-drop-tests-with-net-access.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File oauth2-drop-tests-with-net-access.patch of Package python-oauth2
--- tests/test_oauth.py.orig +++ tests/test_oauth.py @@ -1509,23 +1509,23 @@ class TestClient(unittest.TestCase): self.assertEqual(client.timeout, 3) - def test_access_token_get(self): - """Test getting an access token via GET.""" - client = oauth.Client(self.consumer, None) - resp, content = client.request(self._uri('request_token'), "GET") - - self.assertEqual(int(resp['status']), 200) - - def test_access_token_post(self): - """Test getting an access token via POST.""" - client = oauth.Client(self.consumer, None) - resp, content = client.request(self._uri('request_token'), "POST") - - self.assertEqual(int(resp['status']), 200) - - res = dict(parse_qsl(content)) - self.assertTrue(b'oauth_token' in res) - self.assertTrue(b'oauth_token_secret' in res) +# def test_access_token_get(self): +# """Test getting an access token via GET.""" +# client = oauth.Client(self.consumer, None) +# resp, content = client.request(self._uri('request_token'), "GET") +# +# self.assertEqual(int(resp['status']), 200) + +# def test_access_token_post(self): +# """Test getting an access token via POST.""" +# client = oauth.Client(self.consumer, None) +# resp, content = client.request(self._uri('request_token'), "POST") +# +# self.assertEqual(int(resp['status']), 200) +# +# res = dict(parse_qsl(content)) +# self.assertTrue(b'oauth_token' in res) +# self.assertTrue(b'oauth_token_secret' in res) def _two_legged(self, method): client = oauth.Client(self.consumer, None) @@ -1533,16 +1533,16 @@ class TestClient(unittest.TestCase): body = urlencode(self.body).encode('ascii') return client.request(self._uri('two_legged'), method, body=body) - def test_two_legged_post(self): - """A test of a two-legged OAuth POST request.""" - resp, content = self._two_legged("POST") - - self.assertEqual(int(resp['status']), 200) - - def test_two_legged_get(self): - """A test of a two-legged OAuth GET request.""" - resp, content = self._two_legged("GET") - self.assertEqual(int(resp['status']), 200) +# def test_two_legged_post(self): +# """A test of a two-legged OAuth POST request.""" +# resp, content = self._two_legged("POST") +# +# self.assertEqual(int(resp['status']), 200) + +# def test_two_legged_get(self): +# """A test of a two-legged OAuth GET request.""" +# resp, content = self._two_legged("GET") +# self.assertEqual(int(resp['status']), 200) @mock.patch('httplib2.Http.request') def test_multipart_post_does_not_alter_body(self, mockHttpRequest):
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor