@@ -0,0 +1,1479 @@
+from twisted.internet import defer%0Afrom twisted.trial import unittest%0A%0Afrom storm.twisted.testing import FakeThreadPool%0Afrom storm.twisted.transact import transact, Transactor%0A%0Afrom storm.locals import *%0Afrom storm.databases.sqlite import SQLite%0Afrom storm.uri import URI%0A%0Afrom globaleaks.db.models import TXModel%0Afrom globaleaks import db%0A%0A%0Aclass TestModels(unittest.TestCase):%0A%0A    def setUp(self):%0A        unittest.TestCase.setUp(self)%0A        threadpool = FakeThreadPool()%0A        self.transactor = Transactor(threadpool)%0A        self.database = SQLite(URI('sqlite:///test.db'))%0A%0A        db.database = self.database%0A        db.threadpool = threadpool%0A        db.transactor = self.transactor%0A%0A    @defer.inlineCallbacks%0A    def test_txmodel(self):%0A%0A        class DummyModel(TXModel):%0A            transactor = self.transactor%0A%0A            __storm_table__ = 'test'%0A            createQuery = %22CREATE TABLE %22 + __storm_table__ +%5C%0A                          %22(id INTEGER PRIMARY KEY, test INTEGER)%22%0A%0A            id = Int(primary=True)%0A            test = Int()%0A%0A            @transact%0A            def find(self):%0A                store = db.getStore()%0A                res = store.find(DummyModel, DummyModel.test == 42).one()%0A                return res%0A%0A        dm = DummyModel()%0A        yield dm.createTable()%0A        yield dm.save()%0A%0A        dm = DummyModel()%0A        dm.test = 42%0A        yield dm.save()%0A%0A        result = yield dm.find()%0A        self.assertEqual(result.test, 42)%0A%0A%0A

Add unittest for storm to illustrate it's usage. Also useful to understand when and if they break our usage of it.