MCPcopy Index your code
hub / github.com/piccolo-orm/piccolo / test_get

Method test_get

tests/table/test_objects.py:67–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

65
66class TestGet(DBTestCase):
67 def test_get(self):
68 self.insert_row()
69
70 band = Band.objects().get(Band.name == "Pythonistas").run_sync()
71 assert band is not None
72
73 self.assertEqual(band.name, "Pythonistas")
74
75 def test_get_prefetch(self):
76 self.insert_rows()

Callers

nothing calls this directly

Calls 5

getMethod · 0.80
objectsMethod · 0.80
assertEqualMethod · 0.80
insert_rowMethod · 0.45
run_syncMethod · 0.45

Tested by

no test coverage detected