예제 #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)
예제 #2
0
 def get_db(cls):
     return Testing.get_db()
예제 #3
0
 def setUpClass(cls):
     cls.db = Testing.get_db()
     collection = cls.db.cursor_test
     cls.ModelMock.collection = collection