mirror of https://gitlab.com/litecord/litecord.git
test_channels: validate new channels can be fetched on api
This commit is contained in:
parent
3d27a30339
commit
2f9fea2740
|
|
@ -35,10 +35,17 @@ async def test_channel_create(test_cli_user):
|
||||||
)
|
)
|
||||||
assert resp.status_code == 200
|
assert resp.status_code == 200
|
||||||
rjson = await resp.json
|
rjson = await resp.json
|
||||||
|
channel_id: str = rjson["id"]
|
||||||
assert rjson["name"] == "hello-world"
|
assert rjson["name"] == "hello-world"
|
||||||
|
|
||||||
refetched_guild = await guild.refetch()
|
refetched_guild = await guild.refetch()
|
||||||
assert len(refetched_guild.channels) == 2
|
assert len(refetched_guild.channels) == 2
|
||||||
|
assert channel_id in (channel["id"] for channel in refetched_guild.channels)
|
||||||
|
|
||||||
|
resp = await test_cli_user.get(f"/api/v6/channels/{channel_id}")
|
||||||
|
assert resp.status_code == 200
|
||||||
|
rjson = await resp.json
|
||||||
|
assert rjson["id"] == channel_id
|
||||||
|
|
||||||
|
|
||||||
async def test_channel_message_send(test_cli_user):
|
async def test_channel_message_send(test_cli_user):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue