fix: add back python 2.7 for gcloud usage only (#892)
* fix: add back python 2.7 for gcloud
* fix: fix setup and tests
* fix: add enum34 for python 2.7
* fix: add app engine app and fix noxfile
* fix: move test_app_engine.py
* fix: fix downscoped
* fix: fix downscoped
* fix: remove py2 from classifiers
diff --git a/tests/test_jwt.py b/tests/test_jwt.py
index ba7277c..c0e1184 100644
--- a/tests/test_jwt.py
+++ b/tests/test_jwt.py
@@ -288,9 +288,9 @@
def test_decode_unknown_alg():
- headers = json.dumps({"kid": "1", "alg": "fakealg"})
+ headers = json.dumps({u"kid": u"1", u"alg": u"fakealg"})
token = b".".join(
- map(lambda seg: base64.b64encode(seg.encode("utf-8")), [headers, "{}", "sig"])
+ map(lambda seg: base64.b64encode(seg.encode("utf-8")), [headers, u"{}", u"sig"])
)
with pytest.raises(ValueError) as excinfo:
@@ -300,9 +300,9 @@
def test_decode_missing_crytography_alg(monkeypatch):
monkeypatch.delitem(jwt._ALGORITHM_TO_VERIFIER_CLASS, "ES256")
- headers = json.dumps({"kid": "1", "alg": "ES256"})
+ headers = json.dumps({u"kid": u"1", u"alg": u"ES256"})
token = b".".join(
- map(lambda seg: base64.b64encode(seg.encode("utf-8")), [headers, "{}", "sig"])
+ map(lambda seg: base64.b64encode(seg.encode("utf-8")), [headers, u"{}", u"sig"])
)
with pytest.raises(ValueError) as excinfo: