1. Andreas Madsack
  2. wtforms

Commits

James Crasta  committed 677d105

ext.sqlalchemy tests fixed to work with py3k using 2to3

  • Participants
  • Parent commits 02aff7c
  • Branches default

Comments (0)

Files changed (1)

File tests/ext_sqlalchemy.py

View file
  • Ignore whitespace
         )
 
         Test = type('Test', (Base, ), {})
-        PKTest = type('PKTest', (Base, ), {'__unicode__': lambda x: x.baz })
+        PKTest = type('PKTest', (Base, ), {
+            '__unicode__': lambda x: x.baz,
+            '__str__': lambda x: x.baz,
+        })
 
         mapper(Test, test_table, order_by=[test_table.c.name])
         mapper(PKTest, pk_test_table, order_by=[pk_test_table.c.baz])