Permalink
Browse files

testcase to test unicode in db result

  • Loading branch information...
1 parent 3bd830e commit 18b6b3fbafac6a3aa647f2bef9fb7f77e2a611cb Anand committed Nov 27, 2008
Showing with 7 additions and 1 deletion.
  1. +6 −0 test/db.py
  2. +1 −1 web/db.py
View
@@ -87,6 +87,12 @@ def test_multiple_insert(self):
assert db.select("person", where="name='a'")
assert db.select("person", where="name='b'")
+ def testUnicode(self):
+ db = webtest.setup_database(self.dbname)
+ self.db.insert('person', False, name='user')
+ name = db.select('person')[0].name
+ self.assertEquals(type(name), unicode)
+
class SqliteTest(DBTest):
dbname = "sqlite"
View
@@ -419,7 +419,7 @@ def __init__(self, db_module, keywords):
self.has_pooling = False
# Pooling can be disabled by passing pooling=False in the keywords.
- self.has_pooling = self.has_pooling and self.keywords.pop('pooling', True)
+ self.has_pooling = self.keywords.pop('pooling', True) and self.has_pooling
def _getctx(self):
if not self._ctx.get('db'):

0 comments on commit 18b6b3f

Please sign in to comment.