Commit 9b82e650 authored by Mikaël Salson's avatar Mikaël Salson Committed by Vidjil Team

tests/ Use a temp file for the test, and remove useless config ID

parent e1ee46b7
import unittest
import tempfile
import gluon.contrib.simplejson
from gluon.globals import Request, Session, Storage, Response
from gluon.contrib.test_helpers import form_postvars
......@@ -105,11 +106,12 @@ class DefaultController(unittest.TestCase):
plop = emptyClass()
setattr(plop, 'file', open("../../doc/analysis-example.vidjil", 'rb'))
analysis = tempfile.NamedTemporaryFile()
analysis.write('{"toto": 1, "bla": [], "clones": {"id": "AATA", "tag": 0}}')
setattr(plop, 'file', open(, 'rb'))
setattr(plop, 'filename', 'plopapou')
request.vars['fileToUpload'] = plop
request.vars['config'] = fake_config_id
request.vars['patient'] = fake_patient_id
resp = save_analysis()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment