16 lines
448 B
Python
16 lines
448 B
Python
import os
|
|
import sys
|
|
from unittest.mock import MagicMock
|
|
|
|
# Mock environment variables required by config.py
|
|
os.environ["MQTT_HOST"] = "localhost"
|
|
os.environ["MQTT_PORT"] = "1883"
|
|
os.environ["MQTT_USER"] = "user"
|
|
os.environ["MQTT_PASSWORD"] = "password"
|
|
|
|
# Mock bluetooth package globally for all tests
|
|
mock_bluetooth = MagicMock()
|
|
mock_bluez = MagicMock()
|
|
sys.modules["bluetooth"] = mock_bluetooth
|
|
sys.modules["bluetooth._bluetooth"] = mock_bluez
|