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

Method testBoolean

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

Source from the content-addressed store, hash-verified

193 self.assertEqual(bool(self.db.select("person")), True)
194
195 def testBoolean(self):
196 def t(active):
197 name = "name-%s" % active
198 self.db.insert("person", False, name=name, active=active)
199 a = self.db.select("person", where="name=$name", vars=locals())[0].active
200 self.assertEqual(a, active)
201
202 t(False)
203 t(True)
204
205 def test_insert_default_values(self):
206 self.db.insert("person")

Callers

nothing calls this directly

Calls 1

tFunction · 0.85

Tested by

no test coverage detected