1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Add test fixture for unauthenticated HTTP client (#55561)

* Add test fixture for unauthenticated HTTP client

* Remove things from the future
This commit is contained in:
Erik Montnemery
2021-09-02 13:09:16 +02:00
committed by GitHub
parent b3b9fb0a7c
commit cdaba62d2c
3 changed files with 15 additions and 4 deletions

View File

@@ -331,6 +331,17 @@ def hass_client(hass, aiohttp_client, hass_access_token):
return auth_client
@pytest.fixture
def hass_client_no_auth(hass, aiohttp_client):
"""Return an unauthenticated HTTP client."""
async def client():
"""Return an authenticated client."""
return await aiohttp_client(hass.http.app)
return client
@pytest.fixture
def current_request():
"""Mock current request."""