def get_manager(self): """ A provisioned mock collection for testing """ self.collection = Connection().db.collection self.collection.insert(copy(self.redirect_one)) self.collection.insert(copy(self.redirect_two)) return RedirectManager(self.collection)
def setUp(self): super(FakePymongoConnectionTest, self).setUp() self.conn = Connection()
def test__can_create_db_with_path(self): conn = Connection('mongodb://localhost') self.assertIsNotNone(conn)
def test__can_create_db_without_path(self): conn = Connection() self.assertIsNotNone(conn)