@@ -0,0 +1,952 @@
+from orm import *%0A%0Aclass Post(Model):%0A%0A    def __init__(self, title, text, id=None):%0A        self.id = id%0A        self.title = title%0A        self.text = text%0A%0A    def show(self):%0A        return '%25s %25s' %25 (self.title, self.text)%0A%0A    @classmethod%0A    def schema(cls):%0A        return '''%0A        drop table if exists post;%0A        create table post (%0A            id integer primary key autoincrement,%0A            title text not null,%0A            text text not null%0A        );%0A        '''%0A%0Adb = Database('db.sqlite.test')%0Aobjects = Post.manager(db)%0Ahello_world = objects.save(Post('Hello', 'World'))%0Apost = objects.get(hello_world.id)  # or objects.all()%0Apost.text = 'Mundo'%0Aobjects.update(post)%0Aassert(post.show() == 'Hello Mundo')%0Adb.commit()%0Aobjects.delete(post)%0Adb.commit()%0Aassert(str(objects.save(Post('Hello', 'World'))) == %22%7B'text': 'World', 'id': 2, 'title': 'Hello'%7D%22)%0Adb.close()%0Aassert(objects.all() == %5B%5D)%0Aimport os%0Aos.remove('db.sqlite.test')%0A

Add tests.py