summaryrefslogtreecommitdiffstats
path: root/utils/test/result_collection_api/update/utils.py
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-06-07 16:09:19 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2016-06-08 10:45:56 +0800
commit559102692edcf56b1769d9cee7b5ff1e7332894e (patch)
tree51102ce5c68c507455a64c2bd300905bd91c6de3 /utils/test/result_collection_api/update/utils.py
parent5ac39a0e6c542ac2857d4d877c0df02598cf9b4f (diff)
add mongodb update script in testAPI
add file update.py JIRA: FUNCTEST-298 Change-Id: I419e9b72464ac04562f5550409561d269d9f0d36 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/result_collection_api/update/utils.py')
-rw-r--r--utils/test/result_collection_api/update/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/test/result_collection_api/update/utils.py b/utils/test/result_collection_api/update/utils.py
index ef93f33cf..a18ff0389 100644
--- a/utils/test/result_collection_api/update/utils.py
+++ b/utils/test/result_collection_api/update/utils.py
@@ -16,10 +16,14 @@ def get_abspath(path):
return os.path.abspath(path)
-def url_parse(url):
+def parse_mongodb_url(url):
url = urlparse.urlparse(url)
assert url.scheme == 'mongodb', 'URL must be a MongoDB URL'
+ return url
+
+def url_parse(url):
+ url = parse_mongodb_url(url)
return url.username, url.password, url.hostname, url.port