|
46 | 46 | NetworkError, |
47 | 47 | NotCredential, |
48 | 48 | NotGrantedCall, |
49 | | - ReadOnlyError, |
50 | 49 | ResourceConflictError, |
51 | 50 | ResourceExpiredError, |
52 | 51 | ResourceNotFoundError, |
@@ -84,7 +83,7 @@ def setUp(self): |
84 | 83 | def tearDown(self): |
85 | 84 | self.time_patch.stop() |
86 | 85 |
|
87 | | - ## test helpers |
| 86 | + # test helpers |
88 | 87 |
|
89 | 88 | def test_init(self): |
90 | 89 | # nominal |
@@ -168,7 +167,7 @@ def test_new_consumer_key_request(self): |
168 | 167 | ck = api.new_consumer_key_request() |
169 | 168 | self.assertEqual(ck._client, api) |
170 | 169 |
|
171 | | - ## test wrappers |
| 170 | + # test wrappers |
172 | 171 |
|
173 | 172 | def test__canonicalize_kwargs(self): |
174 | 173 | api = Client(ENDPOINT, APPLICATION_KEY, APPLICATION_SECRET, CONSUMER_KEY) |
@@ -209,7 +208,7 @@ def test_get(self, m_call): |
209 | 208 | self.assertEqual(m_call.return_value, api.get(FAKE_URL, _from="start", to="end")) |
210 | 209 | try: |
211 | 210 | m_call.assert_called_once_with("GET", FAKE_URL + "?to=end&from=start", None, True) |
212 | | - except: |
| 211 | + except Exception: |
213 | 212 | m_call.assert_called_once_with("GET", FAKE_URL + "?from=start&to=end", None, True) |
214 | 213 |
|
215 | 214 | @mock.patch.object(Client, "call") |
@@ -243,7 +242,7 @@ def test_delete(self, m_call): |
243 | 242 | self.assertEqual(m_call.return_value, api.delete(FAKE_URL, _from="start", to="end")) |
244 | 243 | try: |
245 | 244 | m_call.assert_called_once_with("DELETE", FAKE_URL + "?to=end&from=start", None, True) |
246 | | - except: |
| 245 | + except Exception: |
247 | 246 | m_call.assert_called_once_with("DELETE", FAKE_URL + "?from=start&to=end", None, True) |
248 | 247 |
|
249 | 248 | @mock.patch.object(Client, "call") |
@@ -284,7 +283,7 @@ def test_put_no_body(self, m_call): |
284 | 283 | self.assertEqual(m_call.return_value, api.put(FAKE_URL)) |
285 | 284 | m_call.assert_called_once_with("PUT", FAKE_URL, None, True) |
286 | 285 |
|
287 | | - ## test core function |
| 286 | + # test core function |
288 | 287 |
|
289 | 288 | @mock.patch("ovh.client.Session.request") |
290 | 289 | def test_call_no_sign(self, m_req): |
@@ -366,7 +365,6 @@ def test_call_no_sign(self, m_req): |
366 | 365 | @mock.patch("ovh.client.Session.request") |
367 | 366 | def test_call_query_id(self, m_req): |
368 | 367 | m_res = m_req.return_value |
369 | | - m_json = m_res.json.return_value |
370 | 368 | m_res.headers = {"X-OVH-QUERYID": "FR.test1"} |
371 | 369 |
|
372 | 370 | api = Client(ENDPOINT, APPLICATION_KEY, APPLICATION_SECRET) |
|
0 commit comments