Skip to content

Commit

Permalink
add IDA specific test
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-tz committed Oct 21, 2020
1 parent 0a369c5 commit 1e3b29d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@ def parametrize(params, values, **kwargs):
("mimikatz", "function=0x4556E5", capa.features.Characteristic("calls to"), False),
]

FEATURE_PRESENCE_TESTS_IDA = [
# file/imports
# IDA can recover more names of APIs imported by ordinal
("mimikatz", "file", capa.features.file.Import("cabinet.FCIAddFile"), True),
]

FEATURE_COUNT_TESTS = [
("mimikatz", "function=0x40E5C2", capa.features.basicblock.BasicBlock(), 7),
("mimikatz", "function=0x4702FD", capa.features.Characteristic("calls from"), 0),
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ida_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def get_ida_extractor(_path):

@pytest.mark.skip(reason="IDA Pro tests must be run within IDA")
def test_ida_features():
for (sample, scope, feature, expected) in FEATURE_PRESENCE_TESTS:
for (sample, scope, feature, expected) in FEATURE_PRESENCE_TESTS + FEATURE_PRESENCE_TESTS_IDA:
id = make_test_id((sample, scope, feature, expected))

try:
Expand Down

0 comments on commit 1e3b29d

Please sign in to comment.