Skip to content

Commit

Permalink
Fix erroneous test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahopkins committed May 16, 2019
1 parent 02875c6 commit 71c4467
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion sanic_jwt/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
InvalidCustomClaimError,
InvalidVerification,
InvalidVerificationError,
SanicJWTException,
SanicJWTException
)

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_async_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"""


import jwt
from sanic import Blueprint, Sanic
from sanic.response import text
from sanic.views import HTTPMethodView

import jwt
import pytest
from sanic_jwt import Authentication, initialize, protected

Expand Down
1 change: 0 additions & 1 deletion tests/test_claims.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from datetime import datetime, timedelta

import jwt

from freezegun import freeze_time


Expand Down
2 changes: 1 addition & 1 deletion tests/test_complete_authentication.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from datetime import datetime, timedelta

import jwt
from sanic import Sanic
from sanic.response import json

import jwt
import pytest
from freezegun import freeze_time
from sanic_jwt import Authentication, exceptions, Initialize, protected
Expand Down
2 changes: 1 addition & 1 deletion tests/test_custom_claims.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import jwt
from sanic import Sanic

import jwt
import pytest
from sanic_jwt import Claim, exceptions, Initialize

Expand Down
6 changes: 2 additions & 4 deletions tests/test_decorators_override_config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from datetime import datetime, timedelta

import jwt
from sanic import Sanic
from sanic.blueprints import Blueprint
from sanic.response import json

import jwt
from freezegun import freeze_time
from sanic_jwt import Initialize
from sanic_jwt.decorators import protected
Expand Down Expand Up @@ -92,6 +92,4 @@ async def scoped_endpoint(request):
"/test/scoped", headers={"Foobar": "Bearer {}".format(access_token)}
)

assert response.status == 403
assert "Invalid scope." in response.json.get("reasons")
assert response.json.get("exception") == "Unauthorized"
assert response.status == 200
1 change: 0 additions & 1 deletion tests/test_endpoints_auth.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import jwt

import pytest


Expand Down
2 changes: 1 addition & 1 deletion tests/test_endpoints_cbv.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import jwt
from sanic import Sanic
from sanic.response import json
from sanic.views import HTTPMethodView

import jwt
from sanic_jwt import exceptions, Initialize
from sanic_jwt.decorators import protected

Expand Down
2 changes: 1 addition & 1 deletion tests/test_endpoints_cookies.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import binascii
import os

import jwt
from sanic import Sanic
from sanic.response import json

import jwt
import pytest
from sanic_jwt import Initialize, protected

Expand Down
2 changes: 1 addition & 1 deletion tests/test_endpoints_query_string.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import binascii
import os

import jwt
from sanic import Sanic
from sanic.response import json

import jwt
import pytest
from sanic_jwt import Initialize, protected

Expand Down
2 changes: 1 addition & 1 deletion tests/test_extend_payload.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import jwt
from sanic import Sanic

import jwt
from sanic_jwt import Authentication, exceptions, Initialize

# import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/test_me_invalid.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from datetime import datetime, timedelta

import jwt
from sanic.response import json

import jwt
import pytest
from freezegun import freeze_time
from sanic_jwt.decorators import protected
Expand Down

0 comments on commit 71c4467

Please sign in to comment.