tests: attempt to fix flakey tests

This commit is contained in:
Luna 2021-07-09 22:20:45 -03:00
parent eb93b7f912
commit 22f5af9887
1 changed files with 35 additions and 33 deletions

View File

@ -75,6 +75,7 @@ async def test_guild_fetch(test_cli_staff):
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_guild_update(test_cli_staff): async def test_guild_update(test_cli_staff):
"""Test the update of a guild via the Admin API.""" """Test the update of a guild via the Admin API."""
async with test_cli_staff.app.app_context():
rjson = await _create_guild(test_cli_staff) rjson = await _create_guild(test_cli_staff)
guild_id = rjson["id"] guild_id = rjson["id"]
assert not rjson["unavailable"] assert not rjson["unavailable"]
@ -103,6 +104,7 @@ async def test_guild_update(test_cli_staff):
@pytest.mark.asyncio @pytest.mark.asyncio
async def test_guild_delete(test_cli_staff): async def test_guild_delete(test_cli_staff):
"""Test the update of a guild via the Admin API.""" """Test the update of a guild via the Admin API."""
async with test_cli_staff.app.app_context():
rjson = await _create_guild(test_cli_staff) rjson = await _create_guild(test_cli_staff)
guild_id = rjson["id"] guild_id = rjson["id"]