|
23 | 23 | @responses.activate |
24 | 24 | def test_server_get_all(): |
25 | 25 | responses.add( |
26 | | - responses.GET, CLOUDSCALE_API_URL + "/servers", json=[SERVER_RESP], status=200 |
| 26 | + responses.GET, |
| 27 | + CLOUDSCALE_API_URL + "/servers", |
| 28 | + json=[SERVER_RESP], |
| 29 | + status=200, |
27 | 30 | ) |
28 | 31 | responses.add( |
29 | 32 | responses.GET, |
@@ -58,7 +61,10 @@ def test_server_get_all(): |
58 | 61 | @responses.activate |
59 | 62 | def test_server_get_all_fitlered(): |
60 | 63 | responses.add( |
61 | | - responses.GET, CLOUDSCALE_API_URL + "/servers", json=[SERVER_RESP], status=200 |
| 64 | + responses.GET, |
| 65 | + CLOUDSCALE_API_URL + "/servers", |
| 66 | + json=[SERVER_RESP], |
| 67 | + status=200, |
62 | 68 | ) |
63 | 69 |
|
64 | 70 | runner = CliRunner() |
@@ -128,7 +134,11 @@ def test_server_delete(): |
128 | 134 | json=SERVER_RESP, |
129 | 135 | status=200, |
130 | 136 | ) |
131 | | - responses.add(responses.DELETE, CLOUDSCALE_API_URL + "/servers/" + uuid, status=204) |
| 137 | + responses.add( |
| 138 | + responses.DELETE, |
| 139 | + CLOUDSCALE_API_URL + "/servers/" + uuid, |
| 140 | + status=204, |
| 141 | + ) |
132 | 142 | responses.add( |
133 | 143 | responses.DELETE, |
134 | 144 | CLOUDSCALE_API_URL + "/servers/unknown", |
@@ -194,7 +204,10 @@ def test_server_create(): |
194 | 204 | image = "debian9" |
195 | 205 |
|
196 | 206 | responses.add( |
197 | | - responses.POST, CLOUDSCALE_API_URL + "/servers", json=SERVER_RESP, status=201 |
| 207 | + responses.POST, |
| 208 | + CLOUDSCALE_API_URL + "/servers", |
| 209 | + json=SERVER_RESP, |
| 210 | + status=201, |
198 | 211 | ) |
199 | 212 | responses.add( |
200 | 213 | responses.POST, |
@@ -245,7 +258,6 @@ def test_server_update(): |
245 | 258 | responses.add( |
246 | 259 | responses.PATCH, |
247 | 260 | CLOUDSCALE_API_URL + "/servers/" + uuid, |
248 | | - json=SERVER_RESP, |
249 | 261 | status=204, |
250 | 262 | ) |
251 | 263 | responses.add( |
@@ -298,7 +310,9 @@ def test_server_update(): |
298 | 310 | def test_server_start(): |
299 | 311 | uuid = "47cec963-fcd2-482f-bdb6-24461b2d47b1" |
300 | 312 | responses.add( |
301 | | - responses.POST, CLOUDSCALE_API_URL + "/servers/" + uuid + "/start", status=204 |
| 313 | + responses.POST, |
| 314 | + CLOUDSCALE_API_URL + "/servers/" + uuid + "/start", |
| 315 | + status=204, |
302 | 316 | ) |
303 | 317 | responses.add( |
304 | 318 | responses.GET, |
@@ -342,7 +356,9 @@ def test_server_start(): |
342 | 356 | def test_server_stop(): |
343 | 357 | uuid = "47cec963-fcd2-482f-bdb6-24461b2d47b1" |
344 | 358 | responses.add( |
345 | | - responses.POST, CLOUDSCALE_API_URL + "/servers/" + uuid + "/stop", status=204 |
| 359 | + responses.POST, |
| 360 | + CLOUDSCALE_API_URL + "/servers/" + uuid + "/stop", |
| 361 | + status=204, |
346 | 362 | ) |
347 | 363 | responses.add( |
348 | 364 | responses.GET, |
@@ -386,7 +402,9 @@ def test_server_stop(): |
386 | 402 | def test_server_reboot(): |
387 | 403 | uuid = "47cec963-fcd2-482f-bdb6-24461b2d47b1" |
388 | 404 | responses.add( |
389 | | - responses.POST, CLOUDSCALE_API_URL + "/servers/" + uuid + "/reboot", status=204 |
| 405 | + responses.POST, |
| 406 | + CLOUDSCALE_API_URL + "/servers/" + uuid + "/reboot", |
| 407 | + status=204, |
390 | 408 | ) |
391 | 409 | responses.add( |
392 | 410 | responses.GET, |
|
0 commit comments