コード例 #1
0
ファイル: test_package_remote.py プロジェクト: adbmd/omegaml
 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)
コード例 #2
0
 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)
コード例 #3
0
 def setUp(self):
     TestCase.setUp(self)
     delete_database()
コード例 #4
0
 def tearDown(self):
     unittest.TestCase.tearDown(self)
     delete_database()
     disconnect('omega')
コード例 #5
0
 def setUp(self):
     unittest.TestCase.setUp(self)
     delete_database()
コード例 #6
0
 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)