Update test_scripts.py

Here new_rule_path and expected_overlaps will be changed based on the new test rule designed.
Adding tests to check if the code works fine
This commit is contained in:
Aayush Goel
2023-05-10 14:39:16 +05:30
parent d91070c116
commit 187a4712cb
2 changed files with 36 additions and 17 deletions

View File

@@ -82,3 +82,15 @@ def test_proto_conversion(tmpdir):
assert p.returncode == 0
assert p.stdout.startswith(b'{\n "meta": ') or p.stdout.startswith(b'{\r\n "meta": ')
def test_detect_duplicate_features():
new_rule_path = "collection/credit-card/parse-credit-card-information.yml"
args = [
get_rules_path(),
os.path.join(get_rules_path(), new_rule_path),
]
expected_overlaps = 49
script_path = get_script_path("detect_duplicate_features.py")
p = run_program(script_path, args)
assert p.returncode == expected_overlaps