Commit 8de97110 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

Merge branch 'feature-s/4793-fix-segmenter-controller' into 'dev'

Feature s/4793 fix segmenter controller

See merge request !967
parents b0b07800 61e9252d
Pipeline #256302 passed with stages
in 14 minutes and 57 seconds
......@@ -36,4 +36,9 @@ location /cgi/ {
include /etc/nginx/fastcgi_params;
# Adjust non standard parameters (SCRIPT_FILENAME)
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
location /analyze {
alias /usr/share/vidjil/browser/;
index segmenter_page.html;
\ No newline at end of file
......@@ -55,7 +55,7 @@ def segment_sequences(sequences):
germline_folder = defs.DIR_VIDJIL + '/germline/'
## config de vidjil
config = '-c designations -2 -3 -g germline'
config = '-c designations -3 -g germline'
config = config.replace( ' germline' ,germline_folder)
## commande complete
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.contrib.test_helpers import form_postvars
from gluon import current
class SegmenterController(unittest.TestCase):
def __init__(self, p):
global auth, session, request
unittest.TestCase.__init__(self, p)
def setUp(self):
# Load the to-be-tested file
execfile("applications/vidjil/controllers/", globals())
# set up default session/request/auth/...
global response, session, request, auth
session = Session()
request = Request({})
auth = VidjilAuth(globals(), db)
auth.login_bare("", "123456")
# rewrite info / error functions
# for some reasons we lost them between the testRunner and the testCase but we need them to avoid error so ...
def f(a, **kwargs):
pass = f
log.error = f
log.debug = f
# for defs
current.db = db
current.auth = auth
def testIndex(self):
request.vars['sequences'] = ">plop \nATGTCGTCGTATGCGT"
resp = index()
# TODO enable
# self.assertTrue("ATGTCGTCGTATGCGT" in resp, "index() did not return the expected sequence analysis "+resp)
\ No newline at end of file
......@@ -13,8 +13,10 @@ class DefaultController(unittest.TestCase)
BEWARE that the name is NOT in plural (controllers->Controller)
apt-get install python-pip
pip install unittest2
pip install unittest-xml-reporting
pip install mock
Execute with:
> python -S vidjil -M -R
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