Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
richardkiss committed Oct 29, 2024
1 parent 3f52360 commit 3c08823
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chia/_tests/core/server/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def test_connection_string_conversion(
# WSChiaConnection(local_type=<NodeType.FULL_NODE: 1>, local_port=50632, local_capabilities=[<Capability.BASE: 1>, <Capability.BLOCK_HEADERS: 2>, <Capability.RATE_LIMITS_V2: 3>], peer_host='127.0.0.1', peer_port=50640, peer_node_id=<bytes32: 566a318f0f656125b4fef0e85fbddcf9bc77f8003d35293c392479fc5d067f4d>, outbound_rate_limiter=<chia.server.rate_limits.RateLimiter object at 0x114a13f50>, inbound_rate_limiter=<chia.server.rate_limits.RateLimiter object at 0x114a13e90>, is_outbound=False, creation_time=1675271096.275591, bytes_read=68, bytes_written=162, last_message_time=1675271096.276271, peer_server_port=50636, active=False, closed=False, connection_type=<NodeType.FULL_NODE: 1>, request_nonce=32768, peer_capabilities=[<Capability.BASE: 1>, <Capability.BLOCK_HEADERS: 2>, <Capability.RATE_LIMITS_V2: 3>], version='', protocol_version='') # noqa
converted = method(peer)
print(converted)
assert len(converted) < 1000
assert len(converted) < 1080


@pytest.mark.anyio
Expand Down
3 changes: 3 additions & 0 deletions chia/util/class_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ def class_for_type(
return self[node_type]
except KeyError:
raise KeyError(f"No class for type: {node_type}")

def __repr__(self) -> str:
return "ClassRegistry()"

0 comments on commit 3c08823

Please sign in to comment.