Skip to content

Commit

Permalink
Fix tests - Subgraph stopped resolving some names (#511)
Browse files Browse the repository at this point in the history
  • Loading branch information
djstrong authored Dec 30, 2024
1 parent b1cd7fd commit 395d5ae
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/nameguard-python/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,17 @@ def test_inspect_namehash_get(
'0x1bc53f6413409d078ec18a29b17f981eafab341598a4e970ac9efab7d29258af',
'unnormalized',
'[zzz].eth',
marks=pytest.mark.xfail(not pytest.use_monkeypatch, reason='Subgraph stopped resolving this namehash'),
marks=pytest.mark.xfail(
not pytest.use_monkeypatch or running_lambda_tests, reason='Subgraph stopped resolving this namehash'
),
),
pytest.param(
'0X1Bc53f6413409d078ec18a29b17f981eafab341598a4e970ac9efab7d29258af',
'unnormalized',
'[zzz].eth',
marks=pytest.mark.xfail(not pytest.use_monkeypatch, reason='Subgraph stopped resolving this namehash'),
marks=pytest.mark.xfail(
not pytest.use_monkeypatch or running_lambda_tests, reason='Subgraph stopped resolving this namehash'
),
),
# uppercase hex
],
Expand Down Expand Up @@ -452,11 +456,14 @@ def test_inspect_namehash_invalid_namehash(test_client, namehash, expected_reaso


@pytest.mark.flaky(retries=2, condition=not pytest.use_monkeypatch)
@pytest.mark.xfail(not pytest.use_monkeypatch, reason='Subgraph stopped resolving this namehash')
@pytest.mark.xfail(
not pytest.use_monkeypatch or running_lambda_tests, reason='Subgraph stopped resolving this namehash'
)
def test_inspect_namehash_mismatch_error(test_client):
network_name = 'mainnet'
# todo: how to find registered namehash with null bytes inside?
namehash = '0xdffa165b6d6cfb2fa47e0d50e429380c60e7be170ba21301c22628b66653a951' # the name looks like unknown
namehash = '0xdffa165b6d6cfb2fa47e0d50e429380c60e7be170ba21301c22628b66653a951' # the name looks like unknown:
# [1220bab8d21e1619549d0e92f7f9100059d1a8717877ba82348bf61c06bacb46].eth
response = test_client.post('/inspect-namehash', json={'namehash': namehash, 'network_name': network_name})
assert response.status_code == 500
res_json = response.json()
Expand Down

0 comments on commit 395d5ae

Please sign in to comment.