diff options
Diffstat (limited to 'unitest-restful.py')
-rwxr-xr-x | unitest-restful.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unitest-restful.py b/unitest-restful.py index 8eb3e19b..08f7c27f 100755 --- a/unitest-restful.py +++ b/unitest-restful.py @@ -104,8 +104,10 @@ class TestGlances(unittest.TestCase): self.assertIsInstance(req.json(), text_type) elif p in ('fs', 'percpu', 'sensors', 'alert', 'processlist', 'diskio', 'hddtemp', 'batpercent', 'network', 'folders', 'amps', 'ports', - 'irq', 'wifi', 'gpu'): + 'irq', 'wifi', 'gpu', 'containers'): self.assertIsInstance(req.json(), list) + if len(req.json()) > 0: + self.assertIsInstance(req.json()[0], dict) else: self.assertIsInstance(req.json(), dict) |