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)
def get_db(cls): return Testing.get_db()
def setUpClass(cls): cls.db = Testing.get_db() collection = cls.db.cursor_test cls.ModelMock.collection = collection