Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
),
)
aresponses.add(
"production.tile-api.com",
f"/api/v1/clients/{TILE_CLIENT_UUID}/sessions",
"post",
aresponses.Response(text=json.dumps(fixture_create_session), status=200),
)
aresponses.add(
"production.tile-api.com",
"/api/v1/bad_endpoint",
"get",
aresponses.Response(text="", status=404),
)
with pytest.raises(RequestError):
async with aiohttp.ClientSession() as session:
client = await async_login(
TILE_EMAIL, TILE_PASSWORD, client_uuid=TILE_CLIENT_UUID, session=session
)
await client._request("get", "bad_endpoint")