From bb7eb5269917cfde51abb50a4dca175ddd371fb9 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Fri, 21 Feb 2014 15:35:18 +0100 Subject: [REM] RPC from js/qunit tests They're a pain in the ass, they never worked right and they're basically useless. Screw it. bzr revid: xmo@openerp.com-20140221143518-hv3rjkw2b00ughvh --- addons/web/static/src/js/testing.js | 50 ------------------------------------- 1 file changed, 50 deletions(-) (limited to 'addons/web/static/src/js/testing.js') diff --git a/addons/web/static/src/js/testing.js b/addons/web/static/src/js/testing.js index 41dd2f03ad9..1f1c718ad5f 100644 --- a/addons/web/static/src/js/testing.js +++ b/addons/web/static/src/js/testing.js @@ -196,7 +196,6 @@ openerp.testing = {}; }); }; - var db = window['oe_db_info']; testing.section = function (name, options, body) { if (_.isFunction(options)) { body = options; @@ -235,40 +234,6 @@ openerp.testing = {}; .push(env._oe.setup, env._oe.teardown) .push(options.setup, options.teardown); var opts = _.defaults({}, options, env._oe); - // FIXME: if this test is ignored, will still query - if (opts.rpc === 'rpc' && !db) { - QUnit.config.autostart = false; - db = { - source: null, - supadmin: null, - password: null - }; - var $msg = $('
') - .append('

A test needs to clone a database

') - .append('

Please provide the source clone information

') - .append(' Source DB: ').append('').append('
') - .append(' DB Password: ').append('').append('
') - .append('Admin Password: ').append('').append('
') - .append('') - .submit(function (e) { - e.preventDefault(); - e.stopPropagation(); - db.source = $msg.find('input[name=source]').val(); - db.supadmin = $msg.find('input[name=supadmin]').val(); - db.password = $msg.find('input[name=password]').val(); - QUnit.start(); - $.unblockUI(); - }); - $.blockUI({ - message: $msg, - css: { - fontFamily: 'monospace', - textAlign: 'left', - whiteSpace: 'pre-wrap', - cursor: 'default' - } - }); - } QUnit.test(name, function () { var instance = openerp; @@ -302,21 +267,6 @@ openerp.testing = {}; instance.session.responses[spec] = handler; }; break; - case 'rpc': - async = true; - (function () { - // Add a session setup at the start of the stack to ensure user is logged in - case_stack = case_stack.unshift(function (instance) { - // FIXME hack: don't want the session to go through shitty loading process of everything - instance.session.session_init = testing.noop; - instance.session.load_modules = testing.noop; - instance.session.session_bind(); - if (instance.session.session_is_valid()) { - return $.when(); - } - return instance.session.session_authenticate(db.source, 'admin', db.password, true); - }); - })(); } // Always execute tests asynchronously -- cgit v1.2.3