update repository references and improve script handling
This commit is contained in:
22
hassio-google-drive-backup/tests/test_starter.py
Normal file
22
hassio-google-drive-backup/tests/test_starter.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import pytest
|
||||
import os
|
||||
from backup.module import MainModule, BaseModule
|
||||
from backup.starter import Starter
|
||||
from backup.config import Config, Setting
|
||||
from injector import Injector
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bootstrap_requirements(cleandir):
|
||||
# This just verifies we're able to satisfy starter's injector requirements.
|
||||
injector = Injector([BaseModule(), MainModule()])
|
||||
config = injector.get(Config)
|
||||
config.override(Setting.DATA_CACHE_FILE_PATH, os.path.join(cleandir, "data_cache.json"))
|
||||
injector.get(Starter)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_start_and_stop(injector):
|
||||
starter = injector.get(Starter)
|
||||
await starter.start()
|
||||
await starter.stop()
|
||||
Reference in New Issue
Block a user