summaryrefslogtreecommitdiff
path: root/addons/web/controllers/testing.py
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2013-08-06 14:07:24 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2013-08-06 14:07:24 +0200
commit392e9d260bb692e4fa404848e70c6dc7ea61c36a (patch)
treed3d65a03e90c29deb73cf72a7a5b758d303dd647 /addons/web/controllers/testing.py
parent122f0aa9b39f0ed26dc26d09e4afffd949730cd1 (diff)
parentcb55e11c700efa298a74da781a108185682325da (diff)
[IMP] Mostly improvements of openerpframework.js . Moved a lot of necessary features to it (jsonrpc, models, translations,...). Added tests. Also some other style improvements.
bzr revid: nicolas.vanhoren@openerp.com-20130806120724-55nsh8ay9qiac72r
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