Add tests for metrics API

This commit is contained in:
tuhina2020
2018-10-12 09:26:52 +05:30
parent b0b7e8d25d
commit ac7ff491e1
2 changed files with 19 additions and 2 deletions

View File

@@ -250,8 +250,8 @@ def admin_only(self):
@auth_decorator
def metrics_authentication(self):
"""Decorator for restricting access to metrics"""
user = self.get_current_user()
authenticate_prometheus = self.authenticate_prometheus()
user = self.current_user
authenticate_prometheus = self.authenticate_prometheus
if user is None and not user.authenticate_prometheus:
raise web.HTTPError(403)