def setup(): with db.user_transaction('Create users'): db.make_user(name='user', password='******', email='user@localhost')
def set_user_create(self, data): kind = data.get('_kind') attr = dict(without_underscores(data)) yield db.make_user(kind and db.get_type(kind), **attr)