From 11e008861adc5588ee8988333459eebd91756689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Tue, 2 Sep 2008 12:59:37 +0000 Subject: [PATCH] support database connection strings with hostname git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23342 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/tests/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/product/ERP5Type/tests/utils.py b/product/ERP5Type/tests/utils.py index d2b6345147..a682d69018 100644 --- a/product/ERP5Type/tests/utils.py +++ b/product/ERP5Type/tests/utils.py @@ -201,6 +201,9 @@ def getMySQLArguments(): if not connection_string: return '-u test test' db, user = connection_string.split() + if "@" in db: + db, host = db.split('@') + return "-u %s -h %s %s" % (user, host, db) return '-u %s %s' % (user, db) # decorators -- 2.30.9