Example #1
0
    def test_get_db(self):
        db1 = Testing.get_db()
        assert db1
        self.assertEqual(db1.name, Testing.MONGO_DBNAME)

        db2 = Testing.get_db()

        self.assertIs(db1, db2)
Example #2
0
 def get_db(cls):
     return Testing.get_db()
Example #3
0
 def setUpClass(cls):
     cls.db = Testing.get_db()
     collection = cls.db.cursor_test
     cls.ModelMock.collection = collection
 def get_app(self):
     from settings import Testing
     options = Testing().as_dict()
     return create_app(database_engine=self.database_engine, **options)