mirror of
https://github.com/OMGeeky/homecontrol.esp-sensors.git
synced 2026-02-23 15:49:52 +01:00
refactor: clean up imports in MQTT modules and tests
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user