From cda01894dc628e73a6202ce64f23b1eea0cb7f9f Mon Sep 17 00:00:00 2001 From: James Woglom Date: Tue, 20 Apr 2021 00:52:11 -0400 Subject: [PATCH] add basic fake for tconnect api classes --- tests/api/__init__.py | 0 tests/api/fake.py | 49 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 tests/api/__init__.py create mode 100644 tests/api/fake.py diff --git a/tests/api/__init__.py b/tests/api/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/api/fake.py b/tests/api/fake.py new file mode 100644 index 0000000..45c9aea --- /dev/null +++ b/tests/api/fake.py @@ -0,0 +1,49 @@ +import tconnectsync.api + +class ControlIQApi(tconnectsync.api.controliq.ControlIQApi): + BASE_URL = 'invalid://' + LOGIN_URL = 'invalid://' + + def __init__(self): + pass + + def login(self, email, password): + raise NotImplementedError + + def get(self, endpoint, query): + raise NotImplementedError + +class WS2Api(tconnectsync.api.ws2.WS2Api): + BASE_URL = 'invalid://' + + def __init__(self): + pass + + def get(self, endpoint, query): + raise NotImplementedError + + def get_jsonp(self, endpoint): + raise NotImplementedError + +class AndroidApi(tconnectsync.api.android.AndroidApi): + BASE_URL = 'invalid://' + + def __init__(self): + pass + + def login(self, email, password): + raise NotImplementedError + + def needs_relogin(self): + return False + + def get(self, endpoint, query={}, **kwargs): + raise NotImplementedError + +class TConnectApi(tconnectsync.api.TConnectApi): + def __init__(self): + pass + + _ciq = ControlIQApi() + _ws2 = WS2Api() + _android = AndroidApi()