first working tests
This commit is contained in:
17
src/ad_test/utils.py
Normal file
17
src/ad_test/utils.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import asyncio
|
||||
from typing import List
|
||||
|
||||
import pytest
|
||||
from appdaemon.appdaemon import AppDaemon
|
||||
|
||||
|
||||
async def delayed_stop(ad: AppDaemon, delay: float):
|
||||
await asyncio.sleep(delay)
|
||||
ad.stop()
|
||||
|
||||
|
||||
def get_load_order(caplog: pytest.LogCaptureFixture) -> List[str]:
|
||||
for record in caplog.records:
|
||||
if record.name == "AppDaemon._app_management":
|
||||
if "Determined module load order" in record.msg:
|
||||
return record.args[0]
|
||||
Reference in New Issue
Block a user