bito-code-review[bot] commented on PR #42295:
URL: https://github.com/apache/superset/pull/42295#issuecomment-5040535414

   <!-- Bito Reply -->
   The flagged issue is a misinterpretation of the test's intent. The test 
`test_query_context_modified_singular_metric_param` correctly validates that a 
chart storing a metric under the singular `metric` key is allowed to generate a 
payload with a plural `metrics` list without being flagged as tampering. The 
setup correctly models the chart's stored parameters, and the test correctly 
asserts that this is not tampering. No changes are required.
   
   **tests/unit_tests/security/manager_test.py**
   ```
   query_context.slice_.params_dict = {
           "metric": "sum__SP_POP_TOTL",
           "groupby": [],
       }
   
       query_context.form_data = {
           "slice_id": 42,
           "metric": "sum__SP_POP_TOTL",
       }
       query_context.queries = [QueryObject(metrics=["sum__SP_POP_TOTL"])]  # 
type: ignore
       assert not query_context_modified(query_context)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to