Skip to content

Commit 4443a22

Browse files
committed
add tests for issue 67
1 parent 5a893b5 commit 4443a22

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/test_bugs.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""Test GitHub issues."""
2+
import pytest
3+
from netcompare import CheckType
4+
from .utility import ASSERT_FAIL_MESSAGE
5+
6+
7+
issue_67 = (
8+
{"global": {"peers": {"10.1.0.0": "peer1", "10.2.0.0": "peer2"}}},
9+
[]
10+
)
11+
12+
issue_67_test = [
13+
issue_67,
14+
]
15+
16+
17+
@pytest.mark.parametrize("data, expected_output", issue_67_test)
18+
def test_issue_67(data, expected_output):
19+
"""Resolve issue 67: https://github.com/networktocode-llc/netcompare/issues/67"""
20+
my_jmspath = "global[*]"
21+
my_check = CheckType.init(check_type="exact_match")
22+
pre_value = my_check.get_value(output=data, path=my_jmspath)
23+
assert pre_value == pre_value, ASSERT_FAIL_MESSAGE.format(output=pre_value, expected_output=expected_output)

0 commit comments

Comments
 (0)