From 4caf0fcad622b689f2436f7f91e0c6816d8931cf Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Tue, 15 Dec 2015 14:36:57 +0000 Subject: [PATCH] Fixing pull requests comments - full path to imports - renamed client lib from jwt->authentication --- app/main/__init__.py | 4 ++-- app/main/authentication/auth.py | 2 +- app/main/errors.py | 2 +- requirements.txt | 2 +- tests/app/main/views/test_authentication.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/main/__init__.py b/app/main/__init__.py index 67cf4dcfb..9631e7011 100644 --- a/app/main/__init__.py +++ b/app/main/__init__.py @@ -11,5 +11,5 @@ main = Blueprint('main', __name__) main.before_request(requires_auth) -from .views import notifications, index -from . import errors +from app.main.views import notifications, index +from app.main import errors diff --git a/app/main/authentication/auth.py b/app/main/authentication/auth.py index e0dcd0966..2762d5052 100644 --- a/app/main/authentication/auth.py +++ b/app/main/authentication/auth.py @@ -1,5 +1,5 @@ from flask import request, jsonify, _request_ctx_stack -from client.jwt import decode_jwt_token, get_token_issuer +from client.authentication import decode_jwt_token, get_token_issuer from client.errors import TokenDecodeError, TokenRequestError, TokenExpiredError, TokenPayloadError diff --git a/app/main/errors.py b/app/main/errors.py index 9c7879b00..d7720e5ac 100644 --- a/app/main/errors.py +++ b/app/main/errors.py @@ -1,6 +1,6 @@ from flask import jsonify -from . import main +from app.main import main @main.app_errorhandler(400) diff --git a/requirements.txt b/requirements.txt index 3fd5aeed9..34cea9bc1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ Flask==0.10.1 Flask-Script==2.0.5 PyJWT==1.4.0 -git+https://github.com/alphagov/notifications-python-client.git@0.1.2#egg=notifications-python-client==0.1.2 +git+https://github.com/alphagov/notifications-python-client.git@0.1.5#egg=notifications-python-client==0.1.5 diff --git a/tests/app/main/views/test_authentication.py b/tests/app/main/views/test_authentication.py index eb7f2aa83..dd7d482cd 100644 --- a/tests/app/main/views/test_authentication.py +++ b/tests/app/main/views/test_authentication.py @@ -1,5 +1,5 @@ from flask import json -from client.jwt import create_jwt_token +from client.authentication import create_jwt_token def test_should_not_allow_request_with_no_token(notify_api):