Skip to content

Commit

Permalink
hot fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
themanyfaceddemon committed Aug 12, 2024
1 parent 44e4be4 commit cf9848c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DMBotNetwork/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async def _call_method(cls, metods_dict: Dict[str, Any], method_name: str, **kwa
logger.error(f"Error calling method {method_name}: {e}")
return None

async def _connect(self) -> None:
async def connect(self) -> None:
"""Устанавливает соединение с сервером."""
try:
self._reader, self._writer = await asyncio.open_connection(self._host, self._port)
Expand Down
2 changes: 1 addition & 1 deletion Tests/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async def test_connect(self):
with patch('asyncio.open_connection', new_callable=AsyncMock) as mock_open_connection:
mock_open_connection.return_value = (AsyncMock(), AsyncMock())

await self.client._connect()
await self.client.connect()
self.assertIsNotNone(self.client._reader)
self.assertIsNotNone(self.client._writer)

Expand Down

0 comments on commit cf9848c

Please sign in to comment.