Ejemplo n.º 1
0
 def test_saveStartSparqlJob(self):
     jm = JobManager(self.settings, self.request.session)
     d = jm.saveStartSparqlJob("TypeBidon", "{}")
     jm.removeJob(d)
     del self.request.session['username']
     d = jm.saveStartSparqlJob("", "{}")
     jm.removeJob(d)
Ejemplo n.º 2
0
 def test_saveStartSparqlJob(self):
     jm = JobManager(self.settings, self.request.session)
     d = jm.saveStartSparqlJob("TypeBidon","{}")
     jm.removeJob(d)
     del self.request.session['username']
     d = jm.saveStartSparqlJob("","{}")
     jm.removeJob(d)
Ejemplo n.º 3
0
    def test_updateEndSparqlJob(self):
        jm = JobManager(self.settings, self.request.session)
        jobid = jm.saveStartSparqlJob("TypeBidon","{}")
        jm.updateEndSparqlJob(jobid,"Hello")
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"

        jm.updateEndSparqlJob(jobid,"Hello",nr=10)
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"
        assert l[0]['nr'] == 10

        jm.updateEndSparqlJob(jobid,"Hello",data={ "a" : "b" })
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"
        assert l[0]['data'] == { 'a' : 'b' }

        jm.updateEndSparqlJob(jobid,"Hello",file="test.tsv")
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"
        assert l[0]['file'] == "test.tsv"

        jm.updateEndSparqlJob(jobid,"Hello",file="test.tsv",data={'test': ['t1','t2']})
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"
        assert l[0]['file'] == "test.tsv"

        jm.removeJob(jobid)
Ejemplo n.º 4
0
    def test_updateEndSparqlJob(self):
        jm = JobManager(self.settings, self.request.session)
        jobid = jm.saveStartSparqlJob("TypeBidon","{}")
        jm.updateEndSparqlJob(jobid,"Hello")
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"

        jm.updateEndSparqlJob(jobid,"Hello",nr=10)
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"
        assert l[0]['nr'] == 10

        jm.updateEndSparqlJob(jobid,"Hello",data={ "a" : "b" })
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"
        assert l[0]['data'] == { 'a' : 'b' }

        jm.updateEndSparqlJob(jobid,"Hello",file="test.tsv")
        l = jm.listJobs()
        assert len(l) == 1
        assert l[0]['state'] == "Hello"
        assert l[0]['file'] == "test.tsv"

        jm.removeJob(jobid)