Code Review
/
functest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
3a9d968
)
Remove white space when listing testcases
07/42507/1
author
Linda Wang
<wangwulin@huawei.com>
Wed, 20 Sep 2017 10:08:09 +0000
(10:08 +0000)
committer
Linda Wang
<wangwulin@huawei.com>
Wed, 20 Sep 2017 10:08:09 +0000
(10:08 +0000)
Change-Id: I2f3c7a9301a6b2dcb03a90175be23223f6a6229a
Signed-off-by: Linda Wang <wangwulin@huawei.com>
functest/api/resources/v1/testcases.py
patch
|
blob
|
history
diff --git
a/functest/api/resources/v1/testcases.py
b/functest/api/resources/v1/testcases.py
index
b673313
..
7cc70bb
100644
(file)
--- 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)