コード例 #1
0
ファイル: test_job.py プロジェクト: wangjs/MAGMa
    def setUp(self):
        import tempfile
        self.root_dir = tempfile.mkdtemp()
        self.factory = JobFactory(root_dir=self.root_dir,
                                  submit_url='http://localhost:9998/job',
                                  )

        # fill user db
        transaction.begin()
        engine = create_engine('sqlite:///:memory:')
        mu.DBSession.configure(bind=engine)
        mu.Base.metadata.create_all(engine)  # @UndefinedVariable
        mu.DBSession().add(mu.User(u'bob', u'Bob', u'*****@*****.**'))
        jobid = uuid.UUID('3ad25048-26f6-11e1-851e-00012e260790')
        mu.DBSession().add(mu.JobMeta(jobid, owner=u'bob'))
コード例 #2
0
 def setUp(self):
     self.command = MagmaCommand()
     init_user_db()
     self.command.job_factory = JobFactory('/dev/null')