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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user