Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: tests/test_http.py

Issue 1539313002: Correct a typo (Closed) Base URL: https://github.com/rryk/google-api-python-client.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/test_http.py
diff --git a/tests/test_http.py b/tests/test_http.py
index 43569ed234528043cd91ab951f5b254449212615..943d581d8f05bf9ecf1def52384e69668b839b50 100644
--- a/tests/test_http.py
+++ b/tests/test_http.py
@@ -635,22 +635,22 @@ class TestHttpRequest(unittest.TestCase):
def test_retry_ssl_errors_resumable(self):
with open(datafile('small.png'), 'rb') as small_png_file:
- small_png_file_descriptor = BytesIO(small_png_file.read())
- upload = MediaIoBaseUpload(fd=small_png_file, mimetype='image/png',
- chunksize=500, resumable=True)
- model = JsonModel()
-
- request = HttpRequest(
- HttpMockWithSSLErrors(
- 3, {'status': '200', 'location': 'location'}, '{"foo": "bar"}'),
- model.response,
- u'https://www.example.com/file_upload',
- method='POST',
- resumable=upload)
- request._sleep = lambda _x: 0 # do nothing
- request._rand = lambda: 10
- response = request.execute(num_retries=3)
- self.assertEqual({u'foo': u'bar'}, response)
+ small_png_fd = BytesIO(small_png_file.read())
+ upload = MediaIoBaseUpload(fd=small_png_fd, mimetype='image/png',
+ chunksize=500, resumable=True)
+ model = JsonModel()
+
+ request = HttpRequest(
+ HttpMockWithSSLErrors(
+ 3, {'status': '200', 'location': 'location'}, '{"foo": "bar"}'),
+ model.response,
+ u'https://www.example.com/file_upload',
+ method='POST',
+ resumable=upload)
+ request._sleep = lambda _x: 0 # do nothing
+ request._rand = lambda: 10
+ response = request.execute(num_retries=3)
+ self.assertEqual({u'foo': u'bar'}, response)
def test_retry(self):
num_retries = 5
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698