summaryrefslogtreecommitdiff
path: root/test/test_esp32_cam.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_esp32_cam.py')
-rwxr-xr-xtest/test_esp32_cam.py18
1 files changed, 6 insertions, 12 deletions
diff --git a/test/test_esp32_cam.py b/test/test_esp32_cam.py
index 27ce379..962768f 100755
--- a/test/test_esp32_cam.py
+++ b/test/test_esp32_cam.py
@@ -1,18 +1,12 @@
#!/usr/bin/env python3
-import sys
-import os.path
-sys.path.extend([
- os.path.realpath(
- os.path.join(os.path.dirname(os.path.join(__file__)), '..')
- )
-])
+import __py_include
from pprint import pprint
from argparse import ArgumentParser
from time import sleep
-from src.home.util import parse_addr
-from src.home.camera import esp32
-from src.home.config import config
+from homekit.util import Addr
+from homekit.camera import esp32
+from homekit.config import config
if __name__ == '__main__':
parser = ArgumentParser()
@@ -21,8 +15,8 @@ if __name__ == '__main__':
parser.add_argument('--status', action='store_true',
help='print status and exit')
- arg = config.load(False, parser=parser)
- cam = esp32.WebClient(addr=parse_addr(arg.addr))
+ arg = config.load_app(False, parser=parser)
+ cam = esp32.WebClient(addr=Addr.fromstring(arg.addr))
if arg.status:
status = cam.getstatus()