diff options
author | drebs <drebs@leap.se> | 2016-07-25 07:48:41 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-08-01 21:09:03 -0300 |
commit | fa2c50b9c6cc037a8ab348b5a746b2e728f3068a (patch) | |
tree | 4d73a4f8f1f7d5853194119ccbee6eca4ca7da44 /testing/tests/couch/common.py | |
parent | c40a2bf488e03bef14d440ab1a847afab6f5fb76 (diff) |
[test] allow custom couch url for couch tests
Diffstat (limited to 'testing/tests/couch/common.py')
-rw-r--r-- | testing/tests/couch/common.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/testing/tests/couch/common.py b/testing/tests/couch/common.py index 45cf8d7f..48d30168 100644 --- a/testing/tests/couch/common.py +++ b/testing/tests/couch/common.py @@ -13,10 +13,9 @@ nested_doc = tests.nested_doc def make_couch_database_for_test(test, replica_uid): - port = str(test.couch_port) dbname = ('test-%s' % uuid4().hex) db = couch.CouchDatabase.open_database( - urljoin('http://localhost:' + port, dbname), + urljoin(test.couch_url, dbname), create=True, replica_uid=replica_uid or 'test', ensure_ddocs=True) @@ -25,8 +24,7 @@ def make_couch_database_for_test(test, replica_uid): def copy_couch_database_for_test(test, db): - port = str(test.couch_port) - couch_url = 'http://localhost:' + port + couch_url = test.couch_url new_dbname = db._dbname + '_copy' new_db = couch.CouchDatabase.open_database( urljoin(couch_url, new_dbname), |