refactor: clean up imports in MQTT modules and tests

This commit is contained in:
OMGeeky
2025-06-07 12:42:59 +02:00
parent 81cd6127ef
commit 1a241e4744
4 changed files with 9 additions and 34 deletions

View File

@@ -2,10 +2,11 @@
Tests for the MQTT module.
"""
import pytest
import json
from unittest.mock import patch, MagicMock
from src.esp_sensors.mqtt_client import MQTTClient
import pytest
from src.esp_sensors.mqtt import setup_mqtt, publish_sensor_data

View File

@@ -4,25 +4,19 @@ Tests for the MQTT Client module.
This module contains tests for the MQTTClient class in the mqtt_client.py module.
"""
import struct
import time
from unittest.mock import patch, MagicMock
import pytest
import socket
import struct
from unittest.mock import patch, MagicMock, call
from src.esp_sensors.mqtt_client import (
MQTTClient,
MQTTException,
CONNECT,
CONNACK,
PUBLISH,
PUBACK,
SUBSCRIBE,
SUBACK,
PINGREQ,
PINGRESP,
DISCONNECT,
CONN_ACCEPTED,
)