def setUp(self): self.defaults = settings() OMEGA_STORE_BACKENDS = self.defaults.OMEGA_STORE_BACKENDS self.backend = backend = 'omegaml.backends.package.PythonPipSourcedPackageData' if PythonPipSourcedPackageData.KIND not in OMEGA_STORE_BACKENDS: OMEGA_STORE_BACKENDS[PythonPipSourcedPackageData.KIND] = backend self.om = Omega() delete_database() self.pkgsdir = self.om.scripts.get_backend_bykind( PythonPipSourcedPackageData.KIND).packages_path mkdirs(self.pkgsdir)
def setUp(self): self.basepath = os.path.join( os.path.dirname(sys.modules['omegaml'].__file__), 'example') self.defaults = settings() OMEGA_STORE_BACKENDS = self.defaults.OMEGA_STORE_BACKENDS OMEGA_STORE_MIXINS = self.defaults.OMEGA_STORE_MIXINS self.backend = backend = 'omegaml.backends.package.PythonPackageData' self.mixin = mixin = 'omegaml.mixins.store.package.PythonPackageMixin' if PythonPackageData.KIND not in OMEGA_STORE_BACKENDS: OMEGA_STORE_BACKENDS[PythonPackageData.KIND] = backend if mixin not in OMEGA_STORE_MIXINS: OMEGA_STORE_MIXINS.append(mixin) self.om = Omega() delete_database() self.pkgsdir = self.om.scripts.get_backend_bykind( PythonPackageData.KIND).packages_path self.distdir = os.path.join(self.basepath, 'demo', 'helloworld', 'dist') rmtree(self.distdir, ignore_errors=True) mkdirs(self.distdir) mkdirs(self.pkgsdir)
def setUp(self): TestCase.setUp(self) delete_database()
def tearDown(self): unittest.TestCase.tearDown(self) delete_database() disconnect('omega')
def setUp(self): unittest.TestCase.setUp(self) delete_database()
def setUp(self): delete_database() self.om = Omega() db = self.om.datasets.mongodb self.url = self.om.mongo_url + '?authSource=admin' connectdb(url=self.url)