Skip to content

Commit 395d5ae

Browse files
authored
Fix tests - Subgraph stopped resolving some names (#511)
1 parent b1cd7fd commit 395d5ae

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

packages/nameguard-python/tests/test_api.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,17 @@ def test_inspect_namehash_get(
322322
'0x1bc53f6413409d078ec18a29b17f981eafab341598a4e970ac9efab7d29258af',
323323
'unnormalized',
324324
'[zzz].eth',
325-
marks=pytest.mark.xfail(not pytest.use_monkeypatch, reason='Subgraph stopped resolving this namehash'),
325+
marks=pytest.mark.xfail(
326+
not pytest.use_monkeypatch or running_lambda_tests, reason='Subgraph stopped resolving this namehash'
327+
),
326328
),
327329
pytest.param(
328330
'0X1Bc53f6413409d078ec18a29b17f981eafab341598a4e970ac9efab7d29258af',
329331
'unnormalized',
330332
'[zzz].eth',
331-
marks=pytest.mark.xfail(not pytest.use_monkeypatch, reason='Subgraph stopped resolving this namehash'),
333+
marks=pytest.mark.xfail(
334+
not pytest.use_monkeypatch or running_lambda_tests, reason='Subgraph stopped resolving this namehash'
335+
),
332336
),
333337
# uppercase hex
334338
],
@@ -452,11 +456,14 @@ def test_inspect_namehash_invalid_namehash(test_client, namehash, expected_reaso
452456

453457

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

0 commit comments

Comments
 (0)