def setUp(self):
     super(TestSQLAlchemyMiddleware, self).setUp()
     self.middleware = middleware.SQLAlchemyMiddleware(get_response)
     self.orig_dbs = databases.copy()
     databases.clear()
     databases.update(one=mock.MagicMock(spec=SQLAlchemy),
                      two=mock.MagicMock(spec=SQLAlchemy))
Example #2
0
    def test_update(self):
        databases = dbdict()

        databases.update({"one": SQLAlchemy("sqlite://")}, two=SQLAlchemy("sqlite://"))
 def tearDown(self):
     super(TestSQLAlchemyMiddleware, self).setUp()
     databases.clear()
     databases.update(self.orig_dbs)
Example #4
0
 def tearDown(self):
     super().setUp()
     databases.clear()
     databases.update(self.orig_dbs)