more complexity to test case

This commit is contained in:
John Lancaster
2024-06-06 21:10:02 -05:00
parent 6a2877ca71
commit 1135082055
5 changed files with 22 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
from appdaemon.adapi import ADAPI from appdaemon.adapi import ADAPI
class DatabaseApp(ADAPI):
def initialize(self): class Database:
self.log(f'Initialized from {__file__}') def __init__(self, ad: ADAPI) -> None:
self.ad = ad

View File

@@ -14,4 +14,8 @@ Hello:
module: hello module: hello
class: HelloWorld class: HelloWorld
globals:
module: globals
global: true
# Foo: bar # Foo: bar

1
apps/globals/globals.py Normal file
View File

@@ -0,0 +1 @@
GLOBAL_CONSTANT = True

9
apps/test/test.py Normal file
View File

@@ -0,0 +1,9 @@
from app1.database import Database
from appdaemon.adbase import ADBase
class Test(ADBase):
def initialize(self):
self.adapi = self.get_ad_api()
self.database = Database(self.adapi)
# self.notify.send("Test message from Test2 app.")

4
apps/test/test.yaml Normal file
View File

@@ -0,0 +1,4 @@
test:
module: test
class: Test
log_level: DEBUG