summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCedric Ollivier <cedric.ollivier@orange.com>2017-09-21 05:04:07 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-21 05:04:07 +0000
commit77b1231c610a659ca6e782c9297b4a0d918eb97f (patch)
treef9f08e55f06cf7d5f30c35cc908f15f5115ae153
parent12b13d1816eea129ff19379a6d2b8ba03e176840 (diff)
parentc5a39292d1e4371ae3826901b8f8df4b08ff3855 (diff)
Merge "Remove white space when listing testcases" into stable/euphrates
-rw-r--r--functest/api/resources/v1/testcases.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/functest/api/resources/v1/testcases.py b/functest/api/resources/v1/testcases.py
index b67331377..7cc70bbc9 100644
--- a/functest/api/resources/v1/testcases.py
+++ b/functest/api/resources/v1/testcases.py
@@ -13,6 +13,7 @@ Resources to handle testcase related requests
import logging
import os
+import re
import pkg_resources
import socket
import uuid
@@ -43,7 +44,7 @@ class V1Testcases(ApiResource):
def get(self): # pylint: disable=no-self-use
""" GET all testcases """
testcases_list = Testcase().list()
- result = {'testcases': testcases_list.split('\n')[:-1]}
+ result = {'testcases': re.split(' |\n ', testcases_list)[1:]}
return jsonify(result)