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

Method test_remove

tests/table/instance/test_remove.py:13–27  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

11 Manager.alter().drop_table().run_sync()
12
13 def test_remove(self):
14 manager = Manager(name="Maz")
15 manager.save().run_sync()
16 self.assertTrue(
17 "Maz"
18 in Manager.select(Manager.name).output(as_list=True).run_sync()
19 )
20 self.assertEqual(manager._exists_in_db, True)
21
22 manager.remove().run_sync()
23 self.assertTrue(
24 "Maz"
25 not in Manager.select(Manager.name).output(as_list=True).run_sync()
26 )
27 self.assertEqual(manager._exists_in_db, False)

Callers

nothing calls this directly

Calls 8

ManagerClass · 0.90
saveMethod · 0.80
assertTrueMethod · 0.80
selectMethod · 0.80
assertEqualMethod · 0.80
run_syncMethod · 0.45
outputMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected