1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-10-08 23:22:21 +02:00

fix for no data

This commit is contained in:
Kelly Brazil
2020-06-10 17:20:09 -07:00
parent 35d733b44f
commit d8f2f4c95b
5 changed files with 82 additions and 66 deletions

View File

@@ -23,6 +23,12 @@ class MyTests(unittest.TestCase):
with open(os.path.join(THIS_DIR, os.pardir, 'tests/fixtures/centos-7.7/crontab-u.json'), 'r', encoding='utf-8') as f:
self.centos_7_7_crontab_u_json = json.loads(f.read())
def test_crontab_u_nodata(self):
"""
Test 'crontab' with no data (has a user field)
"""
self.assertEqual(jc.parsers.crontab_u.parse('', quiet=True), {})
def test_crontab_u_ubuntu_18_4(self):
"""
Test 'crontab' on Ubuntu 18.4 (has a user field)