Skip to content

Commit

Permalink
Mock cb.id error (#451)
Browse files Browse the repository at this point in the history
* mock cb.id error

* Update coverage badge

---------

Co-authored-by: github-actions <[email protected]>
  • Loading branch information
djstrong and actions-user authored Oct 29, 2024
1 parent 393f112 commit 7801b4d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 25 deletions.
3 changes: 0 additions & 3 deletions apps/examples.nameguard.io/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ const messages = [
{
address: "0x8Ae0e6dd8eACe27045d9e017C8Cf6dAa9D08C776",
},
{
address: "0xFD9eE68000Dc92aa6c67F8f6EB5d9d1a24086fAd",
},
{
address: "0x9d32572997DA4948063E3Fc11c2552Eb82F7208E",
},
Expand Down
10 changes: 0 additions & 10 deletions packages/nameguard-js/src/secureprimaryName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,6 @@ describe("secure primary name", () => {
false,
"٧٣٧.eth",
],
[
"0xFD9eE68000Dc92aa6c67F8f6EB5d9d1a24086fAd",
null,
"no_primary_name",
null,
'Unnamed fd9e',
null,
false,
null,
],
[
"0x9d32572997DA4948063E3Fc11c2552Eb82F7208E",
"unlikely",
Expand Down
4 changes: 2 additions & 2 deletions packages/nameguard-python/coverage_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 0 additions & 10 deletions packages/nameguard-python/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,16 +636,6 @@ def test_inspect_grapheme_multi(test_client):
False,
'٧٣٧.eth',
),
(
'0xFD9eE68000Dc92aa6c67F8f6EB5d9d1a24086fAd',
None,
'no_primary_name',
None,
'Unnamed fd9e',
None,
False,
None,
), # causes ContractLogicError
(
'0x9d32572997DA4948063E3Fc11c2552Eb82F7208E',
'unlikely',
Expand Down
10 changes: 10 additions & 0 deletions packages/nameguard-python/tests/test_nameguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,16 @@ async def test_dynamic_check_order(nameguard: NameGuard):
endpoint_name.set(None)


@pytest.mark.asyncio
async def test_secure_primary_name_error(nameguard: NameGuard, monkeypatch):
network = 'mainnet'
monkeypatch.setattr(nameguard.ns[network], 'name', lambda address: (_ for _ in ()).throw(Exception('Error')))
r = await nameguard.secure_primary_name(
'0xFD9eE68000Dc92aa6c67F8f6EB5d9d1a24086fAd', network, return_nameguard_report=True
)
assert r.primary_name_status == 'no_primary_name'


@pytest.mark.asyncio
async def test_stress_inspect_name(nameguard: NameGuard):
# with omit_cure=False takes 1 minute
Expand Down

0 comments on commit 7801b4d

Please sign in to comment.