1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

fix for no data

This commit is contained in:
Kelly Brazil
2020-06-11 17:09:51 -07:00
parent cad6dde4ac
commit d2ccad6a83
4 changed files with 33 additions and 15 deletions

View File

@ -23,6 +23,12 @@ class MyTests(unittest.TestCase):
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/ubuntu-18.04/lsmod.json'), 'r', encoding='utf-8') as f:
self.ubuntu_18_4_lsmod_json = json.loads(f.read())
def test_lsmod_nodata(self):
"""
Test 'lsmod' with no data
"""
self.assertEqual(jc.parsers.lsmod.parse('', quiet=True), [])
def test_lsmod_centos_7_7(self):
"""
Test 'lsmod' on Centos 7.7