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.
1 parent c61a796 commit 73e64dcCopy full SHA for 73e64dc
tests/unit_tests/test_async_subtensor.py
@@ -16,15 +16,17 @@
16
17
@pytest.fixture
18
def mock_substrate(mocker):
19
- mocked = mocker.patch(
20
- "bittensor.core.async_subtensor.AsyncSubstrateInterface",
21
- autospec=True,
+ fake_async_substrate = mocker.AsyncMock(
+ autospec=async_subtensor.AsyncSubstrateInterface
+ )
22
+ mocker.patch.object(
23
+ async_subtensor, "AsyncSubstrateInterface", return_value=fake_async_substrate
24
)
25
- return mocked.return_value
26
+ return fake_async_substrate
27
28
-@pytest.fixture(autouse=True)
29
+@pytest.fixture
30
def subtensor(mock_substrate):
31
return async_subtensor.AsyncSubtensor()
32
0 commit comments