MCPcopy Index your code
hub / github.com/StackStorm/st2 / test_to_python

Method test_to_python

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

Source from the content-addressed store, hash-verified

97 self.assertEqual(result, orjson.dumps(MOCK_DATA_DICT))
98
99 def test_to_python(self):
100 field = JSONDictField(use_header=False)
101
102 data = orjson.dumps(MOCK_DATA_DICT)
103 result = field.to_python(data)
104
105 self.assertTrue(isinstance(result, dict))
106 self.assertEqual(result, MOCK_DATA_DICT)
107
108 def test_roundtrip(self):
109 field = JSONDictField(use_header=False)

Callers

nothing calls this directly

Calls 2

to_pythonMethod · 0.95
JSONDictFieldClass · 0.90

Tested by

no test coverage detected