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

Method testCommit

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

Source from the content-addressed store, hash-verified

98 self.assertEqual(len(list(result)), n)
99
100 def testCommit(self):
101 t = self.db.transaction()
102 self.db.insert("person", False, name="user1")
103 t.commit()
104
105 t = self.db.transaction()
106 self.db.insert("person", False, name="user2")
107 self.db.insert("person", False, name="user3")
108 t.commit()
109
110 self.assertRows(3)
111
112 def testRollback(self):
113 t = self.db.transaction()

Callers

nothing calls this directly

Calls 4

assertRowsMethod · 0.95
transactionMethod · 0.80
insertMethod · 0.80
commitMethod · 0.45

Tested by

no test coverage detected