We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 51d1c46 + 8e9b3ac commit e9d0959Copy full SHA for e9d0959
tests/core/kad_dht/test_unit_routing_table.py
@@ -257,6 +257,9 @@ def mock_host(self):
257
"""Create a mock host for testing."""
258
host = Mock()
259
host.get_peerstore.return_value = Mock()
260
+ # Mock new_stream to raise an exception so ping fails in tests
261
+ # This allows peers to be added when bucket is full
262
+ host.new_stream = AsyncMock(side_effect=Exception("Mock stream error"))
263
return host
264
265
@pytest.fixture
0 commit comments