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:
UpstreamData
2024-01-25 14:26:53 -07:00
parent aa1d7c1b6f
commit dd4c087749
261 changed files with 779 additions and 741 deletions

View File

@@ -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

View File

@@ -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):