MCPcopy Index your code
hub / github.com/SourceCode-AI/aura / test_is_suspicious_file

Function test_is_suspicious_file

tests/test_archive.py:23–38  ·  view source on GitHub ↗
(file_path, is_suspicious, fuzzy_rule_match)

Source from the content-addressed store, hash-verified

21 )
22)
23def test_is_suspicious_file(file_path, is_suspicious, fuzzy_rule_match):
24 ret = archive.is_suspicious(pth=file_path, location='something')
25
26 if is_suspicious:
27 assert ret is not None
28 assert isinstance(ret, Detection)
29 match = {
30 "type": "SuspiciousArchiveEntry",
31 "location": "something",
32 "extra": {
33 "entry_path": file_path
34 }
35 }
36 assert fuzzy_rule_match(ret, match)
37 else:
38 assert ret is None
39
40
41def test_zip_extractor(fixtures):

Callers

nothing calls this directly

Calls 1

fuzzy_rule_matchFunction · 0.85

Tested by

no test coverage detected