Allow unloading mobile app (#30995)
This commit is contained in:
1 parent
3c44a1353a
commit
e5365779fe
6 files changed
+86
-206
No files matched your search
@@ -19,6 +19,8 @@ def registry(hass):
|
||||
@pytest.fixture
|
||||
async def create_registrations(hass, authed_api_client):
|
||||
"""Return two new registrations."""
|
||||
await async_setup_component(hass, DOMAIN, {DOMAIN: {}})
|
||||
|
||||
enc_reg = await authed_api_client.post(
|
||||
"/api/mobile_app/registrations", json=REGISTER
|
||||
)
|
||||
@@ -39,11 +41,13 @@ async def create_registrations(hass, authed_api_client):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def webhook_client(hass, aiohttp_client):
|
||||
async def webhook_client(hass, authed_api_client, aiohttp_client):
|
||||
"""mobile_app mock client."""
|
||||
await async_setup_component(hass, DOMAIN, {DOMAIN: {}})
|
||||
await hass.async_block_till_done()
|
||||
return await aiohttp_client(hass.http.app)
|
||||
# We pass in the authed_api_client server instance because
|
||||
# it is used inside create_registrations and just passing in
|
||||
# the app instance would cause the server to start twice,
|
||||
# which caused deprecation warnings to be printed.
|
||||
return await aiohttp_client(authed_api_client.server)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
||||
Reference in new issue
Block a user