@@ -127,49 +127,49 @@ def import_reimport_performance(self, expected_num_queries1, expected_num_async_
127127 importer = DefaultImporter (** import_options )
128128 test , _ , _len_new_findings , _len_closed_findings , _ , _ , _ = importer .process_scan (scan )
129129
130- # use reimport with the full report so it add a finding and some endpoints
131- with (
132- self .subTest ("reimport1" ), impersonate (Dojo_User .objects .get (username = "admin" )),
133- self .assertNumQueries (expected_num_queries2 ),
134- self .assertNumAsyncTask (expected_num_async_tasks2 ),
135- STACK_HAWK_FILENAME .open (encoding = "utf-8" ) as scan ,
136- ):
137- reimport_options = {
138- "test" : test ,
139- "user" : lead ,
140- "lead" : lead ,
141- "scan_date" : None ,
142- "minimum_severity" : "Info" ,
143- "active" : True ,
144- "verified" : True ,
145- "sync" : True ,
146- "scan_type" : STACK_HAWK_SCAN_TYPE ,
147- "tags" : ["performance-test-reimport" , "reimport-tag-in-param" , "reimport-go-faster" ],
148- "apply_tags_to_findings" : True ,
149- }
150- reimporter = DefaultReImporter (** reimport_options )
151- test , _ , _len_new_findings , _len_closed_findings , _ , _ , _ = reimporter .process_scan (scan )
152-
153- # use reimport with the subset again to close a finding and mitigate some endpoints
154- with (
155- self .subTest ("reimport2" ), impersonate (Dojo_User .objects .get (username = "admin" )),
156- self .assertNumQueries (expected_num_queries3 ),
157- self .assertNumAsyncTask (expected_num_async_tasks3 ),
158- STACK_HAWK_SUBSET_FILENAME .open (encoding = "utf-8" ) as scan ,
159- ):
160- reimport_options = {
161- "test" : test ,
162- "user" : lead ,
163- "lead" : lead ,
164- "scan_date" : None ,
165- "minimum_severity" : "Info" ,
166- "active" : True ,
167- "verified" : True ,
168- "sync" : True ,
169- "scan_type" : STACK_HAWK_SCAN_TYPE ,
170- }
171- reimporter = DefaultReImporter (** reimport_options )
172- test , _ , _len_new_findings , _len_closed_findings , _ , _ , _ = reimporter .process_scan (scan )
130+ # # use reimport with the full report so it add a finding and some endpoints
131+ # with (
132+ # self.subTest("reimport1"), impersonate(Dojo_User.objects.get(username="admin")),
133+ # self.assertNumQueries(expected_num_queries2),
134+ # self.assertNumAsyncTask(expected_num_async_tasks2),
135+ # STACK_HAWK_FILENAME.open(encoding="utf-8") as scan,
136+ # ):
137+ # reimport_options = {
138+ # "test": test,
139+ # "user": lead,
140+ # "lead": lead,
141+ # "scan_date": None,
142+ # "minimum_severity": "Info",
143+ # "active": True,
144+ # "verified": True,
145+ # "sync": True,
146+ # "scan_type": STACK_HAWK_SCAN_TYPE,
147+ # "tags": ["performance-test-reimport", "reimport-tag-in-param", "reimport-go-faster"],
148+ # "apply_tags_to_findings": True,
149+ # }
150+ # reimporter = DefaultReImporter(**reimport_options)
151+ # test, _, _len_new_findings, _len_closed_findings, _, _, _ = reimporter.process_scan(scan)
152+
153+ # # use reimport with the subset again to close a finding and mitigate some endpoints
154+ # with (
155+ # self.subTest("reimport2"), impersonate(Dojo_User.objects.get(username="admin")),
156+ # self.assertNumQueries(expected_num_queries3),
157+ # self.assertNumAsyncTask(expected_num_async_tasks3),
158+ # STACK_HAWK_SUBSET_FILENAME.open(encoding="utf-8") as scan,
159+ # ):
160+ # reimport_options = {
161+ # "test": test,
162+ # "user": lead,
163+ # "lead": lead,
164+ # "scan_date": None,
165+ # "minimum_severity": "Info",
166+ # "active": True,
167+ # "verified": True,
168+ # "sync": True,
169+ # "scan_type": STACK_HAWK_SCAN_TYPE,
170+ # }
171+ # reimporter = DefaultReImporter(**reimport_options)
172+ # test, _, _len_new_findings, _len_closed_findings, _, _, _ = reimporter.process_scan(scan)
173173
174174 # patch the we_want_async decorator to always return True so we don't depend on block_execution flag shenanigans
175175 # @patch("dojo.decorators.we_want_async", return_value=True)
0 commit comments