summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2014-02-21 15:35:18 +0100
committerXavier Morel <xmo@openerp.com>2014-02-21 15:35:18 +0100
commitbb7eb5269917cfde51abb50a4dca175ddd371fb9 (patch)
treeb39033e9180f49b02fe825b3c7c1cdfcadef5f01 /addons/web/static/src
parent42763039f0ceb3fcaf875d6afbc29d9ea9827350 (diff)
[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
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/testing.js50
1 files changed, 0 insertions, 50 deletions
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 = $('<form style="margin: 0 1em 1em;">')
- .append('<h3>A test needs to clone a database</h3>')
- .append('<h4>Please provide the source clone information</h4>')
- .append(' Source DB: ').append('<input name="source">').append('<br>')
- .append(' DB Password: ').append('<input name="supadmin">').append('<br>')
- .append('Admin Password: ').append('<input name="password">').append('<br>')
- .append('<input type="submit" value="OK"/>')
- .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