Пример #1
0
    def setUp(self):
        #create 5 new ids and 5 old ones
        #firstly clean the db !
        print "Cleaning the database"
        jobthing.clear_db()
        for new_id in xrange(5):
            tmp_hash = {}
            tmp_hash[self.create_new_jobid()] = (self.status_opt[randint(
                0,
                len(self.status_opt) - 1)], {
                    "some_new.com":
                    self.test_result
                })
            self.new_jobids.append(tmp_hash)

        base_time = self.an_old_time
        for old_id in xrange(5):
            tmp_hash = {}
            tmp_hash[self.create_an_old_jobid(base_time)] = (
                self.status_opt[randint(0,
                                        len(self.status_opt) - 1)], {
                                            "some_old.com": self.test_result
                                        })
            self.old_jobids.append(tmp_hash)
            base_time = base_time + 10
Пример #2
0
    def setUp(self):
        jobthing.clear_db()
        for new_id in xrange(5):
            tmp_hash = {}
            tmp_hash[self.create_new_jobid()] = (self.status_opt[randint(0,len(self.status_opt)-1)],self.test_result)
            self.new_jobids.append(tmp_hash)

        base_time = self.an_old_time
        for old_id in xrange(5):
            tmp_hash = {}
            tmp_hash[self.create_an_old_jobid(base_time)] = (self.status_opt[randint(0,len(self.status_opt)-1)],self.test_result)
            self.old_jobids.append(tmp_hash)
            base_time = base_time + 10
Пример #3
0
    def setUp(self):
        #create 5 new ids and 5 old ones
        #firstly clean the db !
        print "Cleaning the database"
        jobthing.clear_db()
        for new_id in xrange(5):
            tmp_hash = {}
            tmp_hash[self.create_new_jobid()] = (self.status_opt[randint(0,len(self.status_opt)-1)],{"some_new.com":self.test_result})
            self.new_jobids.append(tmp_hash)

        base_time = self.an_old_time
        for old_id in xrange(5):
            tmp_hash = {}
            tmp_hash[self.create_an_old_jobid(base_time)] = (self.status_opt[randint(0,len(self.status_opt)-1)],{"some_old.com":self.test_result})
            self.old_jobids.append(tmp_hash)
            base_time = base_time + 10
Пример #4
0
    def setUp(self):
        jobthing.clear_db()
        for new_id in xrange(5):
            tmp_hash = {}
            tmp_hash[self.create_new_jobid()] = (self.status_opt[randint(
                0,
                len(self.status_opt) - 1)], self.test_result)
            self.new_jobids.append(tmp_hash)

        base_time = self.an_old_time
        for old_id in xrange(5):
            tmp_hash = {}
            tmp_hash[self.create_an_old_jobid(base_time)] = (
                self.status_opt[randint(0,
                                        len(self.status_opt) - 1)],
                self.test_result)
            self.old_jobids.append(tmp_hash)
            base_time = base_time + 10