Skip to content

Commit 73e64dc

Browse files
revert mock_substrate
1 parent c61a796 commit 73e64dc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/unit_tests/test_async_subtensor.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@
1616

1717
@pytest.fixture
1818
def mock_substrate(mocker):
19-
mocked = mocker.patch(
20-
"bittensor.core.async_subtensor.AsyncSubstrateInterface",
21-
autospec=True,
19+
fake_async_substrate = mocker.AsyncMock(
20+
autospec=async_subtensor.AsyncSubstrateInterface
21+
)
22+
mocker.patch.object(
23+
async_subtensor, "AsyncSubstrateInterface", return_value=fake_async_substrate
2224
)
2325

24-
return mocked.return_value
26+
return fake_async_substrate
2527

2628

27-
@pytest.fixture(autouse=True)
29+
@pytest.fixture
2830
def subtensor(mock_substrate):
2931
return async_subtensor.AsyncSubtensor()
3032

0 commit comments

Comments
 (0)