To bind your models to a database at run-time, you can use the following methods: Example test-case setup: If you’d like to see some more examples of how to run tests using Peewee, check out Peewee’s own .