summaryrefslogtreecommitdiffstats
path: root/testapi
diff options
context:
space:
mode:
Diffstat (limited to 'testapi')
-rw-r--r--testapi/opnfv_testapi/resources/handlers.py6
-rwxr-xr-xtestapi/run_test.sh14
-rw-r--r--testapi/test-requirements.txt5
3 files changed, 9 insertions, 16 deletions
diff --git a/testapi/opnfv_testapi/resources/handlers.py b/testapi/opnfv_testapi/resources/handlers.py
index 8255b52..1509646 100644
--- a/testapi/opnfv_testapi/resources/handlers.py
+++ b/testapi/opnfv_testapi/resources/handlers.py
@@ -92,8 +92,6 @@ class GenericApiHandler(web.RequestHandler):
raise gen.Return(ret)
return wrapper
- @web.asynchronous
- @gen.coroutine
@authenticate
def _create(self, miss_checks, db_checks, **kwargs):
"""
@@ -158,8 +156,6 @@ class GenericApiHandler(web.RequestHandler):
.format(query, self.table))
self.finish_request(self.format_data(data))
- @web.asynchronous
- @gen.coroutine
@authenticate
def _delete(self, query):
data = yield self._eval_db_find_one(query)
@@ -171,8 +167,6 @@ class GenericApiHandler(web.RequestHandler):
yield self._eval_db(self.table, 'remove', query)
self.finish_request()
- @web.asynchronous
- @gen.coroutine
@authenticate
def _update(self, query, db_keys):
if self.json_args is None:
diff --git a/testapi/run_test.sh b/testapi/run_test.sh
index 4efc7af..1e05dd6 100755
--- a/testapi/run_test.sh
+++ b/testapi/run_test.sh
@@ -8,15 +8,17 @@ SCRIPTDIR=`dirname $0`
echo "Running unit tests..."
# Creating virtual environment
-virtualenv $SCRIPTDIR/testapi_venv
-source $SCRIPTDIR/testapi_venv/bin/activate
+if [ ! -z $VIRTUAL_ENV ]; then
+ venv=$VIRTUAL_ENV
+else
+ venv=$SCRIPTDIR/.venv
+ virtualenv $venv
+fi
+source $venv/bin/activate
# Install requirements
pip install -r $SCRIPTDIR/requirements.txt
-pip install coverage
-pip install nose>=1.3.1
-pip install pytest
-pip install mock
+pip install -r $SCRIPTDIR/test-requirements.txt
find . -type f -name "*.pyc" -delete
diff --git a/testapi/test-requirements.txt b/testapi/test-requirements.txt
index 4633ad6..645687b 100644
--- a/testapi/test-requirements.txt
+++ b/testapi/test-requirements.txt
@@ -2,10 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
-tox
mock
pytest
-pytest-cov
coverage
-pykwalify
-pip_check_reqs
+nose>=1.3.1