Skip to content

Commit

Permalink
Fix columns duplication on MongoDB Query Runner
Browse files Browse the repository at this point in the history
  • Loading branch information
masayuki038 committed Feb 6, 2024
1 parent 6041750 commit 4632886
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/query_runner/test_mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
parse_query_json,
parse_results,
)
from redash.utils import json_dumps, json_loads, parse_human_time
from redash.utils import json_dumps, parse_human_time


@patch("redash.query_runner.mongodb.pymongo.MongoClient")
Expand Down Expand Up @@ -63,7 +63,7 @@ def test_run_query_with_fields(self, mongo_client):
result, err = mongo_qr.run_query(json_dumps(query), None)

self.assertIsNone(err)
self.assertEqual(expected, json_loads(result))
self.assertEqual(expected, result)

def test_run_query_with_aggregate(self, mongo_client):
config = {
Expand Down Expand Up @@ -96,7 +96,7 @@ def test_run_query_with_aggregate(self, mongo_client):
mongo_client().__getitem__().__getitem__().aggregate.return_value = return_value
result, err = mongo_qr.run_query(json_dumps(query), None)
self.assertIsNone(err)
self.assertEqual(expected, json_loads(result))
self.assertEqual(expected, result)


class TestParseQueryJson(TestCase):
Expand Down

0 comments on commit 4632886

Please sign in to comment.