Commit 8b402084 authored by Maria Arsuaga Rios's avatar Maria Arsuaga Rios
Browse files

FTS:893 Update reuse tests

parent 66db909c
Pipeline #83037 passed with stage
in 13 seconds
...@@ -415,7 +415,12 @@ class TestJobCancel(TestController): ...@@ -415,7 +415,12 @@ class TestJobCancel(TestController):
# Is it in the database? # Is it in the database?
job = Session.query(Job).get(job_id) job = Session.query(Job).get(job_id)
self.assertEqual(job.job_state, 'CANCELED') self.assertEqual(job.job_state, 'CANCELED')
self.assertEqual(job.job_type, 'Y')
auto_session_reuse = pylons.config['fts3.AutoSessionReuse']
if auto_session_reuse == 'true':
self.assertEqual(job.job_type, 'Y')
else:
self.assertEqual(job.job_type, 'N')
self.assertNotEqual(None, job.job_finished) self.assertNotEqual(None, job.job_finished)
for f in job.files: for f in job.files:
......
...@@ -20,7 +20,7 @@ import json ...@@ -20,7 +20,7 @@ import json
from fts3rest.tests import TestController from fts3rest.tests import TestController
from fts3rest.lib.base import Session from fts3rest.lib.base import Session
from fts3.model import Job, File from fts3.model import Job, File
import pylons
class TestMultiple(TestController): class TestMultiple(TestController):
""" """
...@@ -416,8 +416,12 @@ class TestMultiple(TestController): ...@@ -416,8 +416,12 @@ class TestMultiple(TestController):
).json['job_id'] ).json['job_id']
job = Session.query(Job).get(job_id) job = Session.query(Job).get(job_id)
self.assertEqual(job.job_type, 'Y') auto_session_reuse = pylons.config['fts3.AutoSessionReuse']
if auto_session_reuse == 'true':
self.assertEqual(job.job_type, 'Y')
else:
self.assertEqual(job.job_type, 'N')
files = Session.query(File).filter(File.job_id == job_id) files = Session.query(File).filter(File.job_id == job_id)
hashed = files[0].hashed_id hashed = files[0].hashed_id
for f in files: for f in files:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment