mirror of
https://github.com/apache/superset.git
synced 2026-04-14 05:34:38 +00:00
chore: Remove more redundant code in utils/core (#25986)
This commit is contained in:
committed by
GitHub
parent
aee94b39ba
commit
d20b60edd4
@@ -59,7 +59,6 @@ from superset.utils.core import (
|
||||
get_stacktrace,
|
||||
json_int_dttm_ser,
|
||||
json_iso_dttm_ser,
|
||||
JSONEncodedDict,
|
||||
merge_extra_filters,
|
||||
merge_extra_form_data,
|
||||
merge_request_params,
|
||||
@@ -583,15 +582,6 @@ class TestUtils(SupersetTestCase):
|
||||
"-16 days, 4:03:00",
|
||||
)
|
||||
|
||||
def test_json_encoded_obj(self):
|
||||
obj = {"a": 5, "b": ["a", "g", 5]}
|
||||
val = '{"a": 5, "b": ["a", "g", 5]}'
|
||||
jsonObj = JSONEncodedDict()
|
||||
resp = jsonObj.process_bind_param(obj, "dialect")
|
||||
self.assertIn('"a": 5', resp)
|
||||
self.assertIn('"b": ["a", "g", 5]', resp)
|
||||
self.assertEqual(jsonObj.process_result_value(val, "dialect"), obj)
|
||||
|
||||
def test_validate_json(self):
|
||||
valid = '{"a": 5, "b": [1, 5, ["g", "h"]]}'
|
||||
self.assertIsNone(validate_json(valid))
|
||||
|
||||
Reference in New Issue
Block a user