summaryrefslogtreecommitdiff
path: root/addons/web/controllers/testing.py
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2013-08-02 17:08:15 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2013-08-02 17:08:15 +0200
commitab03d9c280dbc34946fc2231abc54ab041a56d29 (patch)
treec760ff28fe37e141dcae5cc6154352109cb35282 /addons/web/controllers/testing.py
parentadc722348c9349bfbab965c07b65a3c6be175561 (diff)
Make the three jsonrpc protocols work correctly with and without session overriding and added tests for all the cases.
That's one small step for a man, a giant leap for all the poor programmers that would have to use that shit one day. bzr revid: nicolas.vanhoren@openerp.com-20130802150815-k2yuf0b3ku5fvx7a
Diffstat (limited to 'addons/web/controllers/testing.py')
-rw-r--r--addons/web/controllers/testing.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/web/controllers/testing.py b/addons/web/controllers/testing.py
index 36afbd1e653..b51b12fc53d 100644
--- a/addons/web/controllers/testing.py
+++ b/addons/web/controllers/testing.py
@@ -13,6 +13,8 @@ from openerp.modules import module
from .main import module_topological_sort
from .. import http
+from ..http import request
+
NOMODULE_TEMPLATE = Template(u"""<!DOCTYPE html>
<html>
<head>
@@ -162,3 +164,11 @@ class TestRunnerController(http.Controller):
for path in glob.glob(normalized_pattern):
# replace OS path separators (from join & normpath) by URI ones
yield path[len(root):].replace(os.path.sep, '/')
+
+ @http.route('/web/tests/set_session_value', type='json', auth="none")
+ def set_session_value(self, value):
+ request.session.some_test_value = value
+
+ @http.route('/web/tests/get_session_value', type='json', auth="none")
+ def get_session_value(self):
+ return request.session.some_test_value \ No newline at end of file