Skip to content

Commit 71e1424

Browse files
committed
Fixed tests
1 parent e64fe48 commit 71e1424

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/cryptojwt/jwx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .jwk.rsa import load_x509_cert
1212
from .jwk.rsa import RSAKey
1313
from .exception import HeaderError
14-
from .utils import b64d
14+
from .utils import b64d, as_bytes
1515

1616
logger = logging.getLogger(__name__)
1717

@@ -244,7 +244,7 @@ def _pick_alg(self, keys):
244244
return alg
245245

246246
def _decode(self, payload):
247-
_msg = b64d(bytes(payload))
247+
_msg = b64d(as_bytes(payload))
248248
if "cty" in self:
249249
if self["cty"] == "JWT":
250250
_msg = json.loads(_msg)

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py{35,36,37},quality
2+
envlist = py{36,37},quality
33

44
[testenv]
55
passenv = CI TRAVIS TRAVIS_*
@@ -10,6 +10,7 @@ extras = testing
1010
deps =
1111
codecov
1212
pytest-cov
13+
pytest-httpserver
1314

1415
[pep8]
1516
max-line-length=100

0 commit comments

Comments
 (0)