Skip to content

Commit

Permalink
feat: 08
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed May 15, 2024
1 parent a393408 commit adfd6e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions ape_polygon/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ape import plugins
from ape.api.networks import LOCAL_NETWORK_NAME, ForkedNetworkAPI, NetworkAPI, create_network_type
from ape_geth import GethProvider
from ape_node import Node
from ape_test import LocalProvider

from .ecosystem import NETWORKS, Polygon, PolygonConfig
Expand Down Expand Up @@ -29,6 +29,6 @@ def networks():
@plugins.register(plugins.ProviderPlugin)
def providers():
for network_name in NETWORKS:
yield "polygon", network_name, GethProvider
yield "polygon", network_name, Node

yield "polygon", LOCAL_NETWORK_NAME, LocalProvider
14 changes: 7 additions & 7 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
EXPECTED_OUTPUT = """
polygon
├── amoy
│ └── geth (default)
│ └── node (default)
├── local (default)
│ └── test (default)
├── mainnet
│ └── geth (default)
│ └── node (default)
└── mumbai
└── geth (default)
└── node (default)
""".strip()


Expand Down Expand Up @@ -48,9 +48,9 @@ def assert_rich_text(actual: str, expected: str):

def test_networks(runner, cli, polygon):
# Do this in case local env changed it.
polygon.mainnet.set_default_provider("geth")
polygon.mumbai.set_default_provider("geth")
polygon.amoy.set_default_provider("geth")
polygon.mainnet.set_default_provider("node")
polygon.mumbai.set_default_provider("node")
polygon.amoy.set_default_provider("node")

result = runner.invoke(cli, ["networks", "list"])
result = runner.invoke(cli, ("networks", "list"))
assert_rich_text(result.output, EXPECTED_OUTPUT)

0 comments on commit adfd6e6

Please sign in to comment.