summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/common
diff options
context:
space:
mode:
Diffstat (limited to 'utils/test/testapi/opnfv_testapi/common')
-rw-r--r--utils/test/testapi/opnfv_testapi/common/check.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/utils/test/testapi/opnfv_testapi/common/check.py b/utils/test/testapi/opnfv_testapi/common/check.py
index acd331784..9ded48dd4 100644
--- a/utils/test/testapi/opnfv_testapi/common/check.py
+++ b/utils/test/testapi/opnfv_testapi/common/check.py
@@ -10,19 +10,16 @@ import functools
import re
from tornado import gen
-from tornado import web
from opnfv_testapi.common import message
from opnfv_testapi.common import raises
from opnfv_testapi.db import api as dbapi
-def authenticate(method):
- @web.asynchronous
- @gen.coroutine
+def valid_token(method):
@functools.wraps(method)
def wrapper(self, *args, **kwargs):
- if self.auth:
+ if self.auth and self.table == 'results':
try:
token = self.request.headers['X-Auth-Token']
except KeyError: