11"Check Type unit tests."
22import pytest
33from netcompare .check_type import CheckType , ExactMatchType , ToleranceType
4- from .utility import load_mocks , ASSERT_FAIL_MESSAGE
4+ from .utility import load_json_file , load_mocks , ASSERT_FAIL_MESSAGE
55
66
77@pytest .mark .parametrize (
@@ -163,7 +163,7 @@ def test_checks(folder_name, check_args, path, expected_result):
163163
164164
165165parameter_match_api = (
166- "parameter_match .json" ,
166+ "pre .json" ,
167167 ("parameter_match" , {"localAsn" : "65130.1100" , "linkType" : "external" }),
168168 "result[0].vrfs.default.peerList[*].[$peerAddress$,localAsn,linkType]" ,
169169 (
@@ -181,7 +181,9 @@ def test_param_match(filename, check_args, path, expected_result):
181181 """Validate parameter_match check type."""
182182 check = CheckType .init (* check_args )
183183 # There is not concept of "pre" and "post" in parameter_match.
184- data = load_json_file ("pre " , filename )
184+ data = load_json_file ("parameter_match " , filename )
185185 value = check .get_value (data , path )
186186 actual_results = check .evaluate (value , check_args )
187- assert actual_results == expected_result
187+ assert actual_results == expected_result , ASSERT_FAIL_MESSAGE .format (
188+ output = actual_results , expected_output = expected_result
189+ )
0 commit comments