Ported patch for peewee from cam-stitt
Fixing peewee tests