Ejemplo n.º 1
0
    def test_addJob_UserJob1(self):
        recordings = self.conn.getAllRecordings()
        if not recordings:
            log.warn("Cannot run unit tests without program listings in the database")
            return

        job = Job.fromProgram(recordings[-1], JobType.USERJOB & JobType.USERJOB1)
        log.debug(job)

        self.assertIsNone(job.id)
        self.db.addJob(job)
        log.debug(job)
        self.assertIsNotNone(job.id)
Ejemplo n.º 2
0
    def test_addJob_UserJob1(self):
        recordings = self.conn.getAllRecordings()
        if not recordings:
            log.warn(
                'Cannot run unit tests without program listings in the database'
            )
            return

        job = Job.fromProgram(recordings[-1],
                              JobType.USERJOB & JobType.USERJOB1)
        log.debug(job)

        self.assertIsNone(job.id)
        self.db.addJob(job)
        log.debug(job)
        self.assertIsNotNone(job.id)
Ejemplo n.º 3
0
 def queueJob(self, jobType):
     job = Job.fromProgram(self.program, jobType)
     self.db().addJob(job)
     numJobs = len(self.db().getJobs(jobStatus=JobStatus.QUEUED))
     toolkit.showPopup('Job Queue', 'Queued as job %d of %d ' % (numJobs,numJobs), 5000)
Ejemplo n.º 4
0
 def queueJob(self, jobType):
     job = Job.fromProgram(self.program, jobType)
     self.db().addJob(job)
     numJobs = len(self.db().getJobs(jobStatus=JobStatus.QUEUED))
     toolkit.showPopup('Job Queue',
                       'Queued as job %d of %d ' % (numJobs, numJobs), 5000)