Skip to content

Commit

Permalink
Add checks for InvalidParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Nov 2, 2023
1 parent 6a0d1c7 commit 184cd34
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_CiscoConfParse.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,19 @@ def testValues_IOSCfgLine_06():
with pytest.raises(InvalidParameters):
parse.insert_before("1")

def testValues_IOSCfgLine_07():
"""test that a bool in the config list and factory=False is rejected with a InvalidParameters()"""
with pytest.raises(InvalidParameters):
parse = CiscoConfParse([False], factory=False)

with pytest.raises(InvalidParameters):
parse = CiscoConfParse([True], factory=False)

def testValues_IOSCfgLine_08():
"""test that a bool in the config list and factory=True is rejected with a InvalidParameters()"""
with pytest.raises(InvalidParameters):
parse = CiscoConfParse([False], factory=True)

def testParse_f5_as_ios_00(parse_f01_ios):
assert len(parse_f01_ios.objs)==20

Expand Down

0 comments on commit 184cd34

Please sign in to comment.