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

Method test_insert

tests/table/test_insert.py:22–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20
21class TestInsert(DBTestCase):
22 def test_insert(self):
23 self.insert_rows()
24
25 Band.insert(Band(name="Rustaceans", popularity=100)).run_sync()
26
27 response = Band.select(Band.name).run_sync()
28 names = [i["name"] for i in response]
29
30 self.assertIn("Rustaceans", names)
31
32 def test_add(self):
33 self.insert_rows()

Callers

nothing calls this directly

Calls 5

BandClass · 0.90
insertMethod · 0.80
selectMethod · 0.80
insert_rowsMethod · 0.45
run_syncMethod · 0.45

Tested by

no test coverage detected