mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 01:02:46 +01:00
Add test coverage for empty list value
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user