diff --git a/unitest-restful.py b/unitest-restful.py index ae7bd696..3744b630 100755 --- a/unitest-restful.py +++ b/unitest-restful.py @@ -182,7 +182,7 @@ class TestGlances(unittest.TestCase): req = requests.get("%s/cpu/%s/3" % (URL, method)) self.assertIsInstance(req.json(), dict) self.assertIsInstance(req.json()['user'], list) - self.assertTrue(len(req.json()['user']) == 3) + self.assertTrue(len(req.json()['user']) > 1) print("HTTP RESTful request: %s/cpu/system/%s" % (URL, method)) req = requests.get("%s/cpu/system/%s" % (URL, method)) self.assertIsInstance(req.json(), dict) @@ -192,7 +192,7 @@ class TestGlances(unittest.TestCase): req = requests.get("%s/cpu/system/%s/3" % (URL, method)) self.assertIsInstance(req.json(), dict) self.assertIsInstance(req.json()['system'], list) - self.assertTrue(len(req.json()['system']) == 3) + self.assertTrue(len(req.json()['system']) > 1) def test_999_stop_server(self): """Stop the Glances Web Server."""