MCPcopy Create free account
hub / github.com/piccolo-orm/piccolo / test_storage

Method test_storage

tests/columns/test_array.py:43–51  ·  view source on GitHub ↗

Make sure data can be stored and retrieved.

(self)

Source from the content-addressed store, hash-verified

41 tables = [MyTable]
42
43 def test_storage(self):
44 """
45 Make sure data can be stored and retrieved.
46 """
47 MyTable(value=[1, 2, 3]).save().run_sync()
48
49 row = MyTable.objects().first().run_sync()
50 assert row is not None
51 self.assertEqual(row.value, [1, 2, 3])
52
53 @engines_skip("sqlite")
54 def test_index(self):

Callers

nothing calls this directly

Calls 6

saveMethod · 0.80
objectsMethod · 0.80
assertEqualMethod · 0.80
MyTableClass · 0.70
run_syncMethod · 0.45
firstMethod · 0.45

Tested by

no test coverage detected