MCPcopy Create free account
hub / github.com/StackStorm/st2 / test_to_mongo

Method test_to_mongo

st2common/tests/unit/test_db_fields.py:92–97  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

90 self.assertTrue(isinstance(result, bytes))
91
92 def test_to_mongo(self):
93 field = JSONDictField(use_header=False)
94 result = field.to_mongo(MOCK_DATA_DICT)
95
96 self.assertTrue(isinstance(result, bytes))
97 self.assertEqual(result, orjson.dumps(MOCK_DATA_DICT))
98
99 def test_to_python(self):
100 field = JSONDictField(use_header=False)

Callers

nothing calls this directly

Calls 2

to_mongoMethod · 0.95
JSONDictFieldClass · 0.90

Tested by

no test coverage detected