Add more tests for _split_pattern for when the input is a list
This commit is contained in:
parent
349eec7855
commit
01ae60d524
1 changed files with 11 additions and 0 deletions
|
@ -44,6 +44,14 @@ class TestInventory(unittest.TestCase):
|
|||
' a : b ': ['a', 'b'],
|
||||
'foo:bar:baz[1:2]': ['foo', 'bar', 'baz[1:2]'],
|
||||
}
|
||||
pattern_lists = [
|
||||
[['a'], ['a']],
|
||||
[['a', 'b'], ['a', 'b']],
|
||||
[['a, b'], ['a', 'b']],
|
||||
[['9a01:7f8:191:7701::9', '9a01:7f8:191:7701::9,foo'],
|
||||
['9a01:7f8:191:7701::9', '9a01:7f8:191:7701::9','foo']]
|
||||
]
|
||||
|
||||
|
||||
def setUp(self):
|
||||
v = VariableManager()
|
||||
|
@ -56,3 +64,6 @@ class TestInventory(unittest.TestCase):
|
|||
for p in self.patterns:
|
||||
r = self.patterns[p]
|
||||
self.assertEqual(r, self.i._split_pattern(p))
|
||||
|
||||
for p, r in self.pattern_lists:
|
||||
self.assertEqual(r, self.i._split_pattern(p))
|
||||
|
|
Loading…
Reference in a new issue