Add test coverage for empty list value

This commit is contained in:
Wes
2022-12-13 16:23:16 +00:00
parent 874bbd2580
commit 98a1fb96c2

View File

@@ -38,3 +38,9 @@ class TestHelpersMethods(unittest.TestCase):
conf = {"file_path": ['testfile.csv']}
path = 'file_path'
self.assertTrue(conf, path)
def test_verifyNonEmptyListValueIsEmpty(self):
conf = {"file_path": ""}
with self.assertRaises(SystemExit) as cm:
helpers.verifyNonEmptyListValue(conf, 'file_path')
self.assertEqual(cm.exception.code, 126)