From 2c5c8a8e991410b5b06e6697be993b8448488a14 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Wed, 16 Dec 2020 08:59:02 -0500 Subject: [PATCH] test --- fHDHR_web/__init__.py | 2 ++ fHDHR_web/api/channels.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fHDHR_web/__init__.py b/fHDHR_web/__init__.py index e8fa686..565ca74 100644 --- a/fHDHR_web/__init__.py +++ b/fHDHR_web/__init__.py @@ -22,6 +22,8 @@ class fHDHR_HTTP_Server(): self.fhdhr.logger.info("Loading Flask.") self.fhdhr.app = Flask("fHDHR", template_folder=self.template_folder) + self.fhdhr.app.testing = True + self.fhdhr.api.client = self.fhdhr.app.test_client() self.fhdhr.logger.info("Loading HTTP Pages Endpoints.") self.pages = fHDHR_Pages(fhdhr) diff --git a/fHDHR_web/api/channels.py b/fHDHR_web/api/channels.py index b47b9dd..723f683 100644 --- a/fHDHR_web/api/channels.py +++ b/fHDHR_web/api/channels.py @@ -104,7 +104,8 @@ class Channels(): elif method == "scan": self.fhdhr.device.channels.get_channels(forceupdate=True) elif method == "test": - self.fhdhr.app.get("/test") + self.fhdhr.api.client.get("/test") + return "test Method" else: return "Invalid Method"