Skip to content

Commit 42b2562

Browse files
committed
Refactor tests
1 parent 9284b1f commit 42b2562

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/mql_panel/test_forms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def test_simple_fields(self):
3131

3232
def test_objectid(self):
3333
"""MongoDB ObjectId from a document."""
34-
oid = ObjectId()
34+
oid = "69cd52da72ad0703d3dfef51"
3535
result = self.form._format_cell_value(oid)
3636
# ObjectIds serialize to {"$oid": "<id>"} which is single-key
3737
self.assertIs(result["is_json"], False)
38-
self.assertEqual(result["value"], str(json.loads(json_util.dumps(oid))["$oid"]))
38+
self.assertEqual(result["value"], oid)
3939

4040
def test_datetime(self):
4141
"""Datetime values as they might appear in a MongoDB doc."""

0 commit comments

Comments
 (0)