Skip to content

Commit 38db3cb

Browse files
committed
test: fix tests
1 parent 620b130 commit 38db3cb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

tests/test_smp_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ def test_constructor() -> None:
8787
@pytest.mark.asyncio
8888
async def test_connect() -> None:
8989
m = SMPMockTransport()
90-
s = SMPClient(m, "address")
90+
s = SMPClient(m, "address", 5.0)
9191
s._initialize = AsyncMock() # type: ignore
9292
await s.connect()
9393

9494
m.connect.assert_awaited_once_with("address", 5.0)
95-
s._initialize.assert_awaited_once_with()
95+
s._initialize.assert_awaited_once_with(5.0)
9696

9797

9898
@pytest.mark.asyncio
@@ -177,7 +177,7 @@ async def test_request() -> None:
177177
@pytest.mark.asyncio
178178
async def test_upload() -> None:
179179
m = SMPMockTransport()
180-
s = SMPClient(m, "address")
180+
s = SMPClient(m, "address", 40.0)
181181

182182
s.request = AsyncMock() # type: ignore
183183

@@ -241,7 +241,7 @@ async def test_upload() -> None:
241241
off=415,
242242
data=image[415 : 415 + 474],
243243
),
244-
timeout_s=2.500,
244+
timeout_s=40.0,
245245
)
246246

247247
# assert that upload() raises SMPUploadError
@@ -388,7 +388,7 @@ async def mock_request(
388388
@pytest.mark.asyncio
389389
async def test_upload_file() -> None:
390390
m = SMPMockTransport()
391-
s = SMPClient(m, "address")
391+
s = SMPClient(m, "address", 2.5)
392392

393393
s.request = AsyncMock() # type: ignore
394394

@@ -619,7 +619,7 @@ async def mock_request(
619619
@pytest.mark.asyncio
620620
async def test_download_file() -> None:
621621
m = SMPMockTransport()
622-
s = SMPClient(m, "address")
622+
s = SMPClient(m, "address", 2.5)
623623

624624
s.request = AsyncMock() # type: ignore
625625

0 commit comments

Comments
 (0)