Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbihel committed Oct 8, 2024
1 parent 3a86e2d commit 3996f1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
run: poetry install && echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
- name: Test
run: poetry run pytest -v
env:
WEB3_PROVIDER_URI: '${{ secrets.WEB3_PROVIDER_URI }}'
- name: Fmt
run: poetry run ruff format . --check
- name: Ruff
Expand Down
6 changes: 3 additions & 3 deletions tests/test_siwe.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ def test_valid_message(self, test_name, test):
def test_eip1271_message(self, test_name, test):
if test_name == "loopring":
pytest.skip()
if os.environ["WEB3_PROVIDER_URI"] is None:
endpoint_uri = "https://cloudflare-eth.com"
else:
try:
endpoint_uri = os.environ["WEB3_PROVIDER_URI"]
except KeyError:
endpoint_uri = "https://cloudflare-eth.com"
provider = HTTPProvider(endpoint_uri=endpoint_uri)
siwe_message = SiweMessage.from_message(message=test["message"])
siwe_message.verify(test["signature"], provider=provider)
Expand Down

0 comments on commit 3996f1f

Please sign in to comment.