From f29e139cbb7e4a4d539cba6e894ef4a6acd312d6 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Wed, 31 May 2023 09:22:00 +0300 Subject: WIP: big refactoring --- test/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/test_api.py') diff --git a/test/test_api.py b/test/test_api.py index 1f6361c..e80eb4c 100755 --- a/test/test_api.py +++ b/test/test_api.py @@ -13,7 +13,7 @@ from src.home.config import config if __name__ == '__main__': - config.load('test_api') + config.load_app('test_api') api = WebAPIClient() print(api.log_bot_request(BotType.ADMIN, 1, "test_api.py")) -- cgit v1.2.3 From 3790c2205396cf860738f297e6ddc49cd2b2a03f Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 10 Jun 2023 22:29:24 +0300 Subject: new config: port openwrt_logger and webapiclient --- test/test_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/test_api.py') diff --git a/test/test_api.py b/test/test_api.py index e80eb4c..ecf8764 100755 --- a/test/test_api.py +++ b/test/test_api.py @@ -7,7 +7,7 @@ sys.path.extend([ ) ]) -from src.home.api import WebAPIClient +from src.home.api import WebApiClient from src.home.api.types import BotType from src.home.config import config @@ -15,5 +15,5 @@ from src.home.config import config if __name__ == '__main__': config.load_app('test_api') - api = WebAPIClient() + api = WebApiClient() print(api.log_bot_request(BotType.ADMIN, 1, "test_api.py")) -- cgit v1.2.3 From a6d8ba93056c1a4e243d56da447e241b2504fae2 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sat, 10 Jun 2023 23:20:37 +0300 Subject: move files again --- test/test_api.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'test/test_api.py') diff --git a/test/test_api.py b/test/test_api.py index ecf8764..80ab62a 100755 --- a/test/test_api.py +++ b/test/test_api.py @@ -1,15 +1,9 @@ #!/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 src.home.api import WebApiClient -from src.home.api.types import BotType -from src.home.config import config +from homekit.api import WebApiClient +from homekit.api.types import BotType +from homekit.config import config if __name__ == '__main__': -- cgit v1.2.3 From 1d0b9c5d1c90c4f7c7a6eb0c3cf32ffb843f2533 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 11 Jun 2023 02:07:51 +0300 Subject: telegram bots: get rid of requests logging via webapi --- test/test_api.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/test_api.py') diff --git a/test/test_api.py b/test/test_api.py index 80ab62a..b35a597 100755 --- a/test/test_api.py +++ b/test/test_api.py @@ -2,12 +2,11 @@ import __py_include from homekit.api import WebApiClient -from homekit.api.types import BotType from homekit.config import config if __name__ == '__main__': config.load_app('test_api') - api = WebApiClient() - print(api.log_bot_request(BotType.ADMIN, 1, "test_api.py")) + # api = WebApiClient() + # print(api.log_bot_request(BotType.ADMIN, 1, "test_api.py")) -- cgit v1.2.3