Skip to content

Commit 5721859

Browse files
committed
fix: cleanup imports in tests
1 parent 4de19f5 commit 5721859

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

meshtastic/tests/test_ota.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
"""Meshtastic unit tests for ota.py"""
22

33
import hashlib
4+
import logging
45
import os
56
import socket
67
import tempfile
7-
from unittest.mock import MagicMock, mock_open, patch, call
8+
from unittest.mock import MagicMock, patch
89

910
import pytest
1011

@@ -396,8 +397,6 @@ def test_esp32_wifi_ota_update_large_firmware(mock_socket_class):
396397
@patch("meshtastic.ota.socket.socket")
397398
def test_esp32_wifi_ota_update_unexpected_response_warning(mock_socket_class, caplog):
398399
"""Test update() logs warning on unexpected response during startup"""
399-
import logging
400-
401400
with tempfile.NamedTemporaryFile(mode="wb", delete=False) as f:
402401
f.write(b"firmware")
403402
temp_file = f.name
@@ -429,8 +428,6 @@ def test_esp32_wifi_ota_update_unexpected_response_warning(mock_socket_class, ca
429428
@patch("meshtastic.ota.socket.socket")
430429
def test_esp32_wifi_ota_update_unexpected_final_response(mock_socket_class, caplog):
431430
"""Test update() logs warning on unexpected final response after firmware upload"""
432-
import logging
433-
434431
with tempfile.NamedTemporaryFile(mode="wb", delete=False) as f:
435432
f.write(b"firmware")
436433
temp_file = f.name

0 commit comments

Comments
 (0)