summaryrefslogtreecommitdiffstats
path: root/unitest-restful.py
diff options
context:
space:
mode:
authorRaz Crimson <52282402+RazCrimson@users.noreply.github.com>2023-03-10 19:05:24 +0530
committerRaz Crimson <52282402+RazCrimson@users.noreply.github.com>2023-03-10 19:08:09 +0530
commit53c1d64aff134a14cee3048165171435c3b2744a (patch)
treec6e58d0e1ca606da4a65239ad6175b56c035ad2e /unitest-restful.py
parentd3bc9061f418088f824d7abda686c91dcd5414eb (diff)
fix: Bottle - /api/%s/status endpoint
prob: failure in compressing `None` with zlib
Diffstat (limited to 'unitest-restful.py')
-rwxr-xr-xunitest-restful.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/unitest-restful.py b/unitest-restful.py
index 362fce61..fa36f88b 100755
--- a/unitest-restful.py
+++ b/unitest-restful.py
@@ -221,6 +221,16 @@ class TestGlances(unittest.TestCase):
self.assertIsInstance(req.json(), dict)
self.assertIsInstance(req.json()['interface_name'], list)
+ def test_012_status(self):
+ """Check status endpoint."""
+ method = "status"
+ print('INFO: [TEST_012] Status')
+ print("HTTP RESTful request: %s/%s" % (URL, method))
+ req = self.http_get("%s/%s" % (URL, method))
+
+ self.assertTrue(req.ok)
+ self.assertEqual(req.text, "Active")
+
def test_999_stop_server(self):
"""Stop the Glances Web Server."""
print('INFO: [TEST_999] Stop the Glances Web Server')