mirror of
https://github.com/getredash/redash.git
synced 2026-03-21 07:00:07 -04:00
Removed pseudojson class, converted all options and other json columns to jsonb ones (#6687)
Co-authored-by: Andrew Chubatiuk <andrew.chubatiuk@motional.com>
This commit is contained in:
@@ -15,7 +15,7 @@ class TestPythonQueryRunner(TestCase):
|
||||
query_string = "print('test')"
|
||||
mock_dt.utcnow = mock.Mock(return_value=datetime(1901, 12, 21))
|
||||
result = self.python.run_query(query_string, "user")
|
||||
self.assertEqual(result[0], '{"rows": [], "columns": [], "log": ["[1901-12-21T00:00:00] test"]}')
|
||||
self.assertEqual(result[0], {"rows": [], "columns": [], "log": ["[1901-12-21T00:00:00] test"]})
|
||||
|
||||
def test_empty_result(self):
|
||||
query_string = "result={}"
|
||||
@@ -68,11 +68,11 @@ class TestPythonQueryRunner(TestCase):
|
||||
result = self.python.run_query(query_string, "user")
|
||||
self.assertEqual(
|
||||
result[0],
|
||||
'{"columns": [{"name": "col1", "type": "string"},'
|
||||
' {"name": "col2", "type": "integer"}],'
|
||||
' "rows": [{"col1": "foo", "col2": 100},'
|
||||
' {"col1": "bar", "col2": 200}],'
|
||||
' "log": []}',
|
||||
{
|
||||
"columns": [{"name": "col1", "type": "string"}, {"name": "col2", "type": "integer"}],
|
||||
"rows": [{"col1": "foo", "col2": 100}, {"col1": "bar", "col2": 200}],
|
||||
"log": [],
|
||||
},
|
||||
)
|
||||
|
||||
@mock.patch("datetime.datetime")
|
||||
@@ -89,11 +89,11 @@ class TestPythonQueryRunner(TestCase):
|
||||
result = self.python.run_query(query_string, "user")
|
||||
self.assertEqual(
|
||||
result[0],
|
||||
'{"columns": [{"name": "col1", "type": "string"},'
|
||||
' {"name": "col2", "type": "integer"}],'
|
||||
' "rows": [{"col1": "foo", "col2": 100},'
|
||||
' {"col1": "bar", "col2": 200}],'
|
||||
' "log": ["[1901-12-21T00:00:00] test"]}',
|
||||
{
|
||||
"columns": [{"name": "col1", "type": "string"}, {"name": "col2", "type": "integer"}],
|
||||
"rows": [{"col1": "foo", "col2": 100}, {"col1": "bar", "col2": 200}],
|
||||
"log": ["[1901-12-21T00:00:00] test"],
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user