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:
Andrii Chubatiuk
2024-01-12 01:02:00 +02:00
committed by GitHub
parent 4d5103978b
commit ec1c4d07de
105 changed files with 549 additions and 606 deletions

View File

@@ -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"],
},
)