def test_timeline(self):
    with test_database(test_db, (User, Tweet)):
        self.create_test_data()
self.assertEqual(Tweet.timeline('user-0')[...])
Custom sqlite database for unit tests for code using peewee ORM