Add an unitest for issue #1401

This commit is contained in:
nicolargo 2019-01-24 21:43:50 +01:00
parent c904a8a3fe
commit 6ca31c947a

View File

@ -217,6 +217,15 @@ class TestGlances(unittest.TestCase):
self.assertIsInstance(req.json()['system'], list)
self.assertTrue(len(req.json()['system']) > 1)
def test_011_issue1401(self):
"""Check issue #1401."""
method = "network/interface_name"
print('INFO: [TEST_011] Issue #1401')
req = self.http_get("%s/%s" % (URL, method))
self.assertTrue(req.ok)
self.assertIsInstance(req.json(), dict)
self.assertIsInstance(req.json()['interface_name'], list)
def test_999_stop_server(self):
"""Stop the Glances Web Server."""
print('INFO: [TEST_999] Stop the Glances Web Server')