Commit bf65fbdb authored by Mikaël Salson's avatar Mikaël Salson

tests/default.py: update test on fuse server

either the fuse server doesn't exist and the test must fail, or the test must succeed as previously
parent 2acd0318
#!/usr/bin/python
import unittest
import gluon.contrib.simplejson
from gluon.globals import Request, Session, Storage, Response
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -66,9 +67,12 @@ class DefaultController(unittest.TestCase):
def testCustomData(self):
request.vars['custom'] = [str(fake_result_id), str(fake_result_id)]
resp = get_custom_data()
resp = gluon.contrib.simplejson.loads(get_custom_data())
print resp
self.assertNotEqual(resp.find('"segmented":[742377,742377]'), -1, "get_custom_data doesn't return a valid json")
if resp.has_key('success') and resp['success'] == 'false':
self.assertTrue(defs.PORT_FUSE_SERVER is None, 'get_custom_data returns error without fuse server')
else:
self.assertNotEqual(resp.find('"segmented":[742377,742377]'), -1, "get_custom_data doesn't return a valid json")
def testGetAnalysis(self):
......
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