Skip to content

Commit 74dd9ee

Browse files
committed
test: fix failing tests
1 parent 039c606 commit 74dd9ee

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

tests/cogs/base/test_api.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,9 @@ async def test_post_load_cog_bad_req(api_client):
232232
assert await resp.text() == '422: Error loading cog: Invalid extension'
233233

234234
async def test_post_load_cog_missing_param(api_client):
235-
resp = await api_client.post('/load-cog', json=
236-
{
237-
'extension': 'invalidCog'
238-
})
235+
resp = await api_client.post('/load-cog', json={})
239236
assert resp.status == BAD_REQUEST
240-
assert await resp.text() == "400: Unsatisfied Arguments: {'package'}"
237+
assert await resp.text() == "400: Unsatisfied Arguments: {'extension'}"
241238

242239
async def test_post_load_cog_already_loaded(api_client):
243240
await api_client.post('/load-cog', json=
@@ -286,12 +283,9 @@ async def test_post_unload_cog_not_loaded(api_client):
286283
assert await resp.text() == '422: Error unloading cog: Extension not loaded'
287284

288285
async def test_post_unload_cog_missing_param(api_client):
289-
resp = await api_client.post('/unload-cog', json=
290-
{
291-
'extension': 'invalidCog'
292-
})
286+
resp = await api_client.post('/unload-cog', json={})
293287
assert resp.status == BAD_REQUEST
294-
assert await resp.text() == "400: Unsatisfied Arguments: {'package'}"
288+
assert await resp.text() == "400: Unsatisfied Arguments: {'extension'}"
295289

296290
async def test_post_unload_base_cog(api_client):
297291
resp = await api_client.post('/unload-cog', json=

0 commit comments

Comments
 (0)