19
19
from assemblyline .common .compat_tag_map import v3_lookup_map , tag_map , UNUSED
20
20
from assemblyline .common .dict_utils import flatten , unflatten , recursive_update , get_recursive_delta
21
21
from assemblyline .common .entropy import calculate_partition_entropy
22
- from assemblyline .common .heuristics import InvalidHeuristicException , service_heuristic_to_result_heuristic
22
+ from assemblyline .common .heuristics import InvalidHeuristicException , HeuristicHandler
23
23
from assemblyline .common .hexdump import hexdump
24
24
from assemblyline .common .identify import fileinfo
25
25
from assemblyline .common .isotime import now_as_iso , iso_to_epoch , epoch_to_local , local_to_epoch , epoch_to_iso , now , \
@@ -234,7 +234,7 @@ def test_heuristics_valid():
234
234
score_map = score_map
235
235
)
236
236
237
- result_heur , _ = service_heuristic_to_result_heuristic (deepcopy (service_heur ), heuristics )
237
+ result_heur , _ = HeuristicHandler (). service_heuristic_to_result_heuristic (deepcopy (service_heur ), heuristics )
238
238
assert result_heur is not None
239
239
assert service_heur ['heur_id' ] == result_heur ['heur_id' ]
240
240
assert service_heur ['score' ] != result_heur ['score' ]
@@ -250,7 +250,7 @@ def test_heuristics_valid():
250
250
251
251
def test_heuristics_invalid ():
252
252
with pytest .raises (InvalidHeuristicException ):
253
- service_heuristic_to_result_heuristic ({'heur_id' : "my_id" }, {})
253
+ HeuristicHandler (). service_heuristic_to_result_heuristic ({'heur_id' : "my_id" }, {})
254
254
255
255
256
256
def test_hexdump ():
0 commit comments