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

Merge branch 'hotfix-s/3548-fix-unit-tests' into 'dev'

Resolve "Test serveurs unitaires cassés depuis 2 mois : 'init_db_helper' is not defined"

Closes #3470 and #3548

See merge request !321
parents 9b1938ae d0938945
Pipeline #43941 passed with stages
in 5 minutes and 2 seconds
......@@ -278,6 +278,9 @@ test_server_unit:
- make unit_server || (make -C server kill_fuse_server; deactivate; false)
- make -C server kill_fuse_server
- deactivate
artifacts:
reports:
junit: server/web2py/test-reports/TEST*xml
only:
- /^feature-.*s.*\/.*$/
- /^hotfix-.*s.*\/.*$/
......
......@@ -48,6 +48,7 @@ import os
import traceback
import shutil
from copy import copy
import vidjil_utils
execfile("applications/vidjil/controllers/default.py", globals())
......@@ -55,9 +56,6 @@ execfile("applications/vidjil/controllers/default.py", globals())
# create a test database by copying the original db
test_db = DAL('sqlite://testing1234.sqlite')
# build default database if doesn't exist
init_db_helper()
for tablename in db.tables: # Copy tables!
table_copy = [f.clone() for f in db[tablename]]
test_db.define_table(tablename, *table_copy)
......@@ -65,8 +63,8 @@ for tablename in db.tables: # Copy tables!
db = test_db
auth.db = test_db
init_db_helper(True)
# build default database if doesn't exist
vidjil_utils.init_db_helper(db, auth, True)
fake_sample_set_id = db.sample_set.insert(sample_type = 'patient')
......
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