1010 VerticalFeedsStatistics , VerticalFeedsSearch , CertificateAnalytics , CertificateThumbprintSearch , \
1111 NewMalwarePlatformFiltered , NewFilesFirstScan , NewFilesFirstAndRescan , FilesWithDetectionChanges , \
1212 MWPChangeEventsFeed , CvesExploitedInTheWild , NewExploitOrCveSamplesFoundInWildHourly , \
13- NewExploitAndCveSamplesFoundInWildDaily , NewWhitelistedFiles , ChangesWhitelistedFiles , AdvancedActions , \
13+ NewExploitAndCveSamplesFoundInWildDaily , NewWhitelistedFiles , ChangesWhitelistedFiles , \
1414 CLASSIFICATIONS , AVAILABLE_PLATFORMS , RHA1_TYPE_MAP , \
1515 resolve_hash_type , calculate_hash , NotFoundError
1616from ReversingLabs .SDK .helper import WrongInputError , BadGatewayError , DEFAULT_USER_AGENT
@@ -1481,61 +1481,3 @@ def test_wrong_input(self):
14811481 self .changes .feed_query (time_format = "utc" , time_value = "12345678" )
14821482
14831483
1484- @pytest .fixture
1485- def dynamic_analysis_mock ():
1486- with mock .patch ("ReversingLabs.SDK.ticloud.DynamicAnalysis.get_dynamic_analysis_results" , autospec = True ) as dynamic_mock :
1487- yield dynamic_mock
1488-
1489-
1490- @pytest .fixture
1491- def file_analysis_mock ():
1492- with mock .patch ("ReversingLabs.SDK.ticloud.FileAnalysis.get_analysis_results" , autospec = True ) as rldata_mock :
1493- yield rldata_mock
1494-
1495-
1496- class TestAdvancedActions :
1497- @classmethod
1498- def setup_class (cls ):
1499- cls .adv_actions = AdvancedActions (HOST , USERNAME , PASSWORD )
1500-
1501- def test_no_da_report (self , dynamic_analysis_mock , file_analysis_mock ):
1502- dynamic_analysis_mock .return_value .json .return_value = {}
1503-
1504- file_analysis_mock .return_value .json .return_value = {
1505- "rl" : {
1506- "sample" : {
1507- "sha1" : SHA1
1508- }
1509- }
1510- }
1511-
1512- result = self .adv_actions .enriched_file_analysis (sample_hash = SHA1 )
1513- expected_result = {}
1514-
1515- assert result == expected_result
1516-
1517- def test_existing_da_field (self , dynamic_analysis_mock , file_analysis_mock ):
1518- dynamic_analysis_mock .return_value .json .return_value = {
1519- "rl" : {
1520- "report" : {
1521- "da_key" : "da_value"
1522- }
1523- }
1524- }
1525-
1526- file_analysis_mock .return_value .json .return_value = {
1527- "rl" : {
1528- "sample" : {
1529- "sha1" : SHA1 ,
1530- "dynamic_analysis" : {
1531- "entries" : [
1532- {"existing_field" : "existing_value" }
1533- ]
1534- }
1535- }
1536- }
1537- }
1538-
1539- result = self .adv_actions .enriched_file_analysis (sample_hash = SHA1 )
1540- assert "entries" in result .get ("rl" ).get ("sample" ).get ("dynamic_analysis" )
1541- assert "report" in result .get ("rl" ).get ("sample" ).get ("dynamic_analysis" )
0 commit comments