mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: increment statsd as warn (#23041)
This commit is contained in:
committed by
GitHub
parent
92b9c06e59
commit
434b445e31
@@ -90,6 +90,8 @@ def post_assert_metric(
|
||||
rv = client.post(uri, json=data)
|
||||
if 200 <= rv.status_code < 400:
|
||||
mock_method.assert_called_once_with("success", func_name)
|
||||
elif 400 <= rv.status_code < 500:
|
||||
mock_method.assert_called_once_with("warning", func_name)
|
||||
else:
|
||||
mock_method.assert_called_once_with("error", func_name)
|
||||
return rv
|
||||
@@ -455,6 +457,8 @@ class SupersetTestCase(TestCase):
|
||||
rv = self.client.get(uri)
|
||||
if 200 <= rv.status_code < 400:
|
||||
mock_method.assert_called_once_with("success", func_name)
|
||||
elif 400 <= rv.status_code < 500:
|
||||
mock_method.assert_called_once_with("warning", func_name)
|
||||
else:
|
||||
mock_method.assert_called_once_with("error", func_name)
|
||||
return rv
|
||||
@@ -474,6 +478,8 @@ class SupersetTestCase(TestCase):
|
||||
rv = self.client.delete(uri)
|
||||
if 200 <= rv.status_code < 400:
|
||||
mock_method.assert_called_once_with("success", func_name)
|
||||
elif 400 <= rv.status_code < 500:
|
||||
mock_method.assert_called_once_with("warning", func_name)
|
||||
else:
|
||||
mock_method.assert_called_once_with("error", func_name)
|
||||
return rv
|
||||
@@ -501,6 +507,8 @@ class SupersetTestCase(TestCase):
|
||||
rv = self.client.put(uri, json=data)
|
||||
if 200 <= rv.status_code < 400:
|
||||
mock_method.assert_called_once_with("success", func_name)
|
||||
elif 400 <= rv.status_code < 500:
|
||||
mock_method.assert_called_once_with("warning", func_name)
|
||||
else:
|
||||
mock_method.assert_called_once_with("error", func_name)
|
||||
return rv
|
||||
|
||||
Reference in New Issue
Block a user