Skip to content

Commit

Permalink
fixup! Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbihel committed Oct 8, 2024
1 parent 3996f1f commit 6a2e3e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/test_siwe.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
with open(BASE_TESTS + "eip1271.json", "r") as f:
verification_eip1271 = decamelize(json.load(fp=f))

try:
endpoint_uri = os.environ["WEB3_PROVIDER_URI"]
except KeyError:
endpoint_uri = "https://cloudflare-eth.com"


class TestMessageParsing:
@pytest.mark.parametrize("abnf", [True, False])
Expand Down Expand Up @@ -85,16 +90,12 @@ def test_valid_message(self, test_name, test):
def test_eip1271_message(self, test_name, test):
if test_name == "loopring":
pytest.skip()
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)

@pytest.mark.parametrize(
"provider", [HTTPProvider(endpoint_uri="https://cloudflare-eth.com"), None]
"provider", [HTTPProvider(endpoint_uri=endpoint_uri), None]
)
@pytest.mark.parametrize(
"test_name,test",
Expand Down

0 comments on commit 6a2e3e1

Please sign in to comment.