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

Server tests: Use VidjilAuth for the authentication

parent af47ecfd
......@@ -2,7 +2,6 @@
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.tools import Auth
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -22,7 +21,7 @@ class AdminController(unittest.TestCase):
global response, session, request, auth
session = Session()
request = Request([])
auth = Auth(globals(), db)
auth = VidjilAuth(globals(), db)
auth.login_bare("test@vidjil.org", "1234")
# rewrite info / error functions
......
......@@ -2,7 +2,6 @@
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.tools import Auth
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -25,7 +24,7 @@ class ConfigController(unittest.TestCase):
global response, session, request, auth
session = Session()
request = Request({})
auth = Auth(globals(), db)
auth = VidjilAuth(globals(), db)
auth.login_bare("test@vidjil.org", "1234")
auth.add_permission(group_id, 'admin', db.patient, 0)
......
......@@ -2,7 +2,6 @@
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.tools import Auth
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -20,7 +19,7 @@ class DefaultController(unittest.TestCase):
global response, session, request, auth
session = Session()
request = Request({})
auth = Auth(globals(), db)
auth = VidjilAuth(globals(), db)
auth.login_bare("test@vidjil.org", "1234")
# rewrite info / error functions
......
......@@ -2,7 +2,6 @@
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.tools import Auth
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -19,7 +18,7 @@ class FileController(unittest.TestCase):
global response, session, request, auth
session = Session()
request = Request({})
auth = Auth(globals(), db)
auth = VidjilAuth(globals(), db)
auth.login_bare("test@vidjil.org", "1234")
# rewrite info / error functions
......
......@@ -2,7 +2,6 @@
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.tools import Auth
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -19,7 +18,7 @@ class GroupController(unittest.TestCase):
global response, session, request, auth
session = Session()
request = Request({})
auth = Auth(globals(), db)
auth = VidjilAuth(globals(), db)
auth.login_bare("test@vidjil.org", "1234")
......
......@@ -2,7 +2,6 @@
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.tools import Auth
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -19,7 +18,7 @@ class PatientController(unittest.TestCase):
global response, session, request, auth
session = Session()
request = Request({})
auth = Auth(globals(), db)
auth = VidjilAuth(globals(), db)
auth.login_bare("test@vidjil.org", "1234")
# rewrite info / error functions
......
......@@ -2,7 +2,6 @@
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.tools import Auth
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -19,7 +18,7 @@ class Results_fileController(unittest.TestCase):
global response, session, request, auth
session = Session()
request = Request({})
auth = Auth(globals(), db)
auth = VidjilAuth(globals(), db)
auth.login_bare("test@vidjil.org", "1234")
# rewrite info / error functions
......
......@@ -2,7 +2,6 @@
import unittest
from gluon.globals import Request, Session, Storage, Response
from gluon.tools import Auth
from gluon.contrib.test_helpers import form_postvars
from gluon import current
......@@ -19,7 +18,7 @@ class UserController(unittest.TestCase):
global response, session, request, auth
session = Session()
request = Request({})
auth = Auth(globals(), db)
auth = VidjilAuth(globals(), db)
auth.login_bare("test@vidjil.org", "1234")
# rewrite info / error functions
......
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