You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/12/16 15:38:20 UTC

[GitHub] [superset] dpgaspar commented on a change in pull request #17751: fix: [alert] allow decimal for alert threshold value

dpgaspar commented on a change in pull request #17751:
URL: https://github.com/apache/superset/pull/17751#discussion_r770649657



##########
File path: tests/integration_tests/alerts_tests.py
##########
@@ -266,6 +266,9 @@ def test_operator_validator(setup_database):
     # Test passing with result that equals threshold
     assert operator_validator(alert2, '{"op": "==", "threshold": 55}') is True
 
+    # Test passing with result that equals decimal threshold
+    assert operator_validator(alert2, '{"op": ">", "threshold": 54.999}') is True

Review comment:
       This test is for the old alerts code base. This test can be added here: https://github.com/apache/superset/blob/master/tests/integration_tests/reports/commands_tests.py#L414
   
   Optional (but would be great). Adding integration API tests to assert bad and good `validator_config_json` 




-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org