refactor: move base classes to base.py in their directories, move data locations to miners.data, and rename types to models.
This commit is contained in:
@@ -64,7 +64,7 @@ class TestAPIBase(unittest.IsolatedAsyncioTestCase):
|
||||
}
|
||||
).encode("utf-8")
|
||||
|
||||
@patch("pyasic.rpc.BaseMinerRPCAPI._send_bytes")
|
||||
@patch("pyasic.rpc.base.BaseMinerRPCAPI._send_bytes")
|
||||
async def test_command_error_raises_api_error(self, mock_send_bytes):
|
||||
if self.api is None:
|
||||
return
|
||||
@@ -73,7 +73,7 @@ class TestAPIBase(unittest.IsolatedAsyncioTestCase):
|
||||
with self.assertRaises(APIError):
|
||||
await self.api.send_command("summary")
|
||||
|
||||
@patch("pyasic.rpc.BaseMinerRPCAPI._send_bytes")
|
||||
@patch("pyasic.rpc.base.BaseMinerRPCAPI._send_bytes")
|
||||
async def test_command_error_ignored_by_flag(self, mock_send_bytes):
|
||||
if self.api is None:
|
||||
return
|
||||
@@ -88,7 +88,7 @@ class TestAPIBase(unittest.IsolatedAsyncioTestCase):
|
||||
f"Expected ignore_errors flag to ignore error in {self.api_str} API"
|
||||
)
|
||||
|
||||
@patch("pyasic.rpc.BaseMinerRPCAPI._send_bytes")
|
||||
@patch("pyasic.rpc.base.BaseMinerRPCAPI._send_bytes")
|
||||
async def test_all_read_command_success(self, mock_send_bytes):
|
||||
if self.api is None:
|
||||
return
|
||||
|
||||
@@ -18,7 +18,7 @@ import unittest
|
||||
import warnings
|
||||
from dataclasses import asdict
|
||||
|
||||
from pyasic.miners.miner_factory import MINER_CLASSES
|
||||
from pyasic.miners.factory import MINER_CLASSES
|
||||
|
||||
|
||||
class MinersTest(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user