1. Marconi Moreto
  2. wtforms

Commits

James Crasta  committed 22f9ba5

Fixed sqlalchemy tests which were failing due to unicode literals issues with type().

  • Participants
  • Parent commits b6af43a
  • Branches default

Comments (0)

Files changed (2)

File tests/ext_sqlalchemy.py

View file
  • Ignore whitespace
             Column('baz', String, nullable=False),
         )
 
-        Test = type('Test', (Base, ), {})
-        PKTest = type('PKTest', (Base, ), {
+        Test = type(str('Test'), (Base, ), {})
+        PKTest = type(str('PKTest'), (Base, ), {
             '__unicode__': lambda x: x.baz,
             '__str__': lambda x: x.baz,
         })

File wtforms/ext/sqlalchemy/orm.py

View file
  • Ignore whitespace
                 prop.direction.name != 'MANYTOMANY':
             for pair in prop.local_remote_pairs:
                 exclude.append(pair[0].key)
-    type_name = type_name or model.__name__ + 'Form'
+    type_name = type_name or str(model.__name__ + 'Form')
     field_dict = model_fields(model, db_session, only, exclude, field_args,
         converter)
     return type(type_name, (ModelForm, ), field_dict)