Skip to content

Commit

Permalink
bump version, upgrade cryptography package, fix tests (#684)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeUrban authored Mar 14, 2023
1 parent 318198a commit 2474d70
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 141 deletions.
261 changes: 127 additions & 134 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion polaris/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.3.6"
__version__ = "2.3.7"
4 changes: 2 additions & 2 deletions polaris/tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def interactive_jwt_payload(transaction, transaction_type):
current_time = time.time()
return {
"iss": f"http://testserver/sep24/transactions/{transaction_type}/interactive",
"exp": current_time + 30,
"iat": current_time,
"exp": current_time + 35,
"iat": current_time - 5,
"jti": str(transaction.id),
"sub": transaction.stellar_account,
}
4 changes: 3 additions & 1 deletion polaris/tests/sep24/test_deposit.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ def test_interactive_deposit_past_exp(client, acc1_usd_deposit_transaction_facto
token = jwt.encode(payload, settings.SERVER_JWT_KEY, algorithm="HS256")

response = client.get(f"{WEBAPP_PATH}?token={token}")
assert "Token is not yet valid or is expired" in str(response.content)
assert "Your session has expired. Please restart the transaction" in str(
response.content
)
assert response.status_code == 403


Expand Down
4 changes: 3 additions & 1 deletion polaris/tests/sep24/test_withdraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,9 @@ def test_interactive_withdraw_past_exp(client):
token = jwt.encode(payload, settings.SERVER_JWT_KEY, algorithm="HS256")

response = client.get(f"{WEBAPP_PATH}?token={token}")
assert "Token is not yet valid or is expired" in str(response.content)
assert "Your session has expired. Please restart the transaction" in str(
response.content
)
assert response.status_code == 403


Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "django-polaris"
version = "2.3.6"
version = "2.3.7"
description = "An extendable Django server for Stellar Ecosystem Proposals."
license = "Apache-2.0"
authors = ["Stellar Development Foundation <[email protected]>"]
Expand Down Expand Up @@ -48,7 +48,7 @@ aiohttp = "^3.7"
django-cors-headers = "^3.7"
toml = "*"
pyjwt = "^2.1"
cryptography = "^3.4"
cryptography = "^39.0"
sqlparse = "^0.4.2"
readthedocs-sphinx-ext = { version = "^2.1", optional = true }
sphinx = { version = "^4.2", optional = true }
Expand Down

0 comments on commit 2474d70

Please sign in to comment.