MCPcopy Index your code
hub / github.com/webpy/webpy / testRollback

Method testRollback

tests/test_db.py:112–118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

110 self.assertRows(3)
111
112 def testRollback(self):
113 t = self.db.transaction()
114 self.db.insert("person", False, name="user1")
115 self.db.insert("person", False, name="user2")
116 self.db.insert("person", False, name="user3")
117 t.rollback()
118 self.assertRows(0)
119
120 def testWrongQuery(self):
121 # It should be possible to run a correct query after getting an error from a wrong query.

Callers

nothing calls this directly

Calls 4

assertRowsMethod · 0.95
transactionMethod · 0.80
insertMethod · 0.80
rollbackMethod · 0.45

Tested by

no test coverage detected