Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miaow2 committed Sep 29, 2023
1 parent 0a22775 commit e6ea6bf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_compliance_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,24 @@
interface fa-0/0
switchport mode access
switchport access vlan 100"""
switchport access vlan 100
"""


@pytest.mark.parametrize(
"regex, expected",
[
(
"^interface.?\n^Building",
"hostname test-1\n\nfa-0/0\n switchport mode access\n switchport access vlan 100\n",
"hostname test-1\n\nfa-0/0\n switchport mode access\n switchport access vlan 100",
),
(
"^interface.*$\n^Building",
"hostname test-1\n\n\n switchport mode access\n switchport access vlan 100\n",
"hostname test-1\n\n\n switchport mode access\n switchport access vlan 100",
),
(
"^Building",
"hostname test-1\n\ninterface fa-0/0\n switchport mode access\n switchport access vlan 100\n",
"hostname test-1\n\ninterface fa-0/0\n switchport mode access\n switchport access vlan 100",
),
],
ids=["part of line", "full line", "no effect"],
Expand Down

0 comments on commit e6ea6bf

Please sign in to comment.