def setup(self): try: import pymongo.errors self.fs = GridFSStorage('mongodb://localhost/gridfs_example', 'testfs') except pymongo.errors.ConnectionFailure: raise SkipTest('MongoDB not running')
def setup(self): try: from depot.io.gridfs import GridFSStorage except ImportError: raise SkipTest('PyMongo not installed') self.fs = GridFSStorage('mongodb://localhost/gridfs_example', 'testfs')
def setup(self): try: from depot.io.gridfs import GridFSStorage except ImportError: raise SkipTest('PyMongo not installed') import pymongo.errors try: self.fs = GridFSStorage('mongodb://localhost/gridfs_example', 'testfs') except pymongo.errors.ConnectionFailure: raise SkipTest('MongoDB not running')
def setup(self): self.fs = GridFSStorage('mongodb://localhost/gridfs_example', 'testfs')