aboutsummaryrefslogtreecommitdiffstats
path: root/opnfv_testapi/tests
diff options
context:
space:
mode:
Diffstat (limited to 'opnfv_testapi/tests')
-rw-r--r--opnfv_testapi/tests/unit/common/normal.ini1
-rw-r--r--opnfv_testapi/tests/unit/executor.py2
-rw-r--r--opnfv_testapi/tests/unit/fake_pymongo.py2
-rw-r--r--opnfv_testapi/tests/unit/resources/test_result.py2
4 files changed, 5 insertions, 2 deletions
diff --git a/opnfv_testapi/tests/unit/common/normal.ini b/opnfv_testapi/tests/unit/common/normal.ini
index 77cc6c6..6906913 100644
--- a/opnfv_testapi/tests/unit/common/normal.ini
+++ b/opnfv_testapi/tests/unit/common/normal.ini
@@ -12,6 +12,7 @@ port = 8000
# With debug_on set to true, error traces will be shown in HTTP responses
debug = True
authenticate = False
+log_file = /dev/null
[swagger]
base_url = http://localhost:8000
diff --git a/opnfv_testapi/tests/unit/executor.py b/opnfv_testapi/tests/unit/executor.py
index b8f696c..72d9d33 100644
--- a/opnfv_testapi/tests/unit/executor.py
+++ b/opnfv_testapi/tests/unit/executor.py
@@ -18,6 +18,8 @@ def upload(excepted_status, excepted_response):
status, body = self.upload(request)
if excepted_status == httplib.OK:
getattr(self, excepted_response)(body)
+ elif excepted_status == httplib.BAD_REQUEST:
+ self.assertEqual(excepted_response, body.msg)
else:
self.assertIn(excepted_response, body)
return wrap
diff --git a/opnfv_testapi/tests/unit/fake_pymongo.py b/opnfv_testapi/tests/unit/fake_pymongo.py
index 0ca83df..28ea966 100644
--- a/opnfv_testapi/tests/unit/fake_pymongo.py
+++ b/opnfv_testapi/tests/unit/fake_pymongo.py
@@ -207,7 +207,7 @@ class MemDb(object):
def _aggregate(self, *args, **kwargs):
res = self.contents
- print args
+ print(args)
for arg in args[0]:
for k, v in arg.iteritems():
if k == '$match':
diff --git a/opnfv_testapi/tests/unit/resources/test_result.py b/opnfv_testapi/tests/unit/resources/test_result.py
index 1e83ed3..3f87f11 100644
--- a/opnfv_testapi/tests/unit/resources/test_result.py
+++ b/opnfv_testapi/tests/unit/resources/test_result.py
@@ -144,7 +144,7 @@ class TestResultBase(base.TestBase):
class TestResultUpload(TestResultBase):
- @executor.upload(httplib.BAD_REQUEST, message.key_error('file'))
+ @executor.upload(httplib.BAD_REQUEST, message.no_file_uploaded())
def test_filenotfind(self):
return None