Skip to content

Commit 68fa37f

Browse files
committed
Fixing new tests and linting issue
1 parent 62e13d7 commit 68fa37f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gcloud/storage/test_api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ def _get_all_buckets_non_empty_helper(self, use_default=False):
119119
])
120120
http = conn._http = Http(
121121
{'status': '200', 'content-type': 'application/json'},
122-
'{{"items": [{{"name": "{0}"}}]}}'.format(BUCKET_NAME).encode('utf-8'),
122+
'{{"items": [{{"name": "{0}"}}]}}'.format(BUCKET_NAME)
123+
.encode('utf-8'),
123124
)
124125

125126
if use_default:
@@ -161,7 +162,7 @@ def test_miss(self):
161162
])
162163
http = conn._http = Http(
163164
{'status': '404', 'content-type': 'application/json'},
164-
'{}',
165+
b'{}',
165166
)
166167
self.assertRaises(NotFound, self._callFUT, NONESUCH, connection=conn)
167168
self.assertEqual(http._called_with['method'], 'GET')
@@ -183,7 +184,7 @@ def _get_bucket_hit_helper(self, use_default=False):
183184
])
184185
http = conn._http = Http(
185186
{'status': '200', 'content-type': 'application/json'},
186-
'{"name": "%s"}' % BLOB_NAME,
187+
'{{"name": "{0}"}}'.format(BLOB_NAME).encode('utf-8'),
187188
)
188189

189190
if use_default:
@@ -226,7 +227,7 @@ def _create_bucket_success_helper(self, use_default=False):
226227
])
227228
http = conn._http = Http(
228229
{'status': '200', 'content-type': 'application/json'},
229-
'{"name": "%s"}' % BLOB_NAME,
230+
'{{"name": "{0}"}}'.format(BLOB_NAME).encode('utf-8'),
230231
)
231232

232233
if use_default:

0 commit comments

Comments
 (0)