MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / manager

Function manager

tests/test_wifi_ssid_debounce.py:16–35  ·  view source on GitHub ↗

A minimal WiFiManager with side-effecting init paths stubbed.

()

Source from the content-addressed store, hash-verified

14
15@pytest.fixture
16def manager():
17 """A minimal WiFiManager with side-effecting init paths stubbed."""
18 from wifi_manager import WiFiManager
19
20 shared = MagicMock()
21 shared.config = {
22 'wifi_ssid_change_debounce_seconds': 30,
23 'wifi_ap_ssid': 'Ragnar',
24 'wifi_ap_password': 'ragnarconnect',
25 'wifi_default_interface': 'auto',
26 }
27 shared.active_network_ssid = None
28 shared.currentdir = '/tmp'
29
30 with patch('wifi_manager.detect_wifi_interface', return_value='wlan0'), \
31 patch('wifi_manager.get_db', return_value=None), \
32 patch.object(WiFiManager, 'setup_ap_logger'), \
33 patch.object(WiFiManager, 'load_wifi_config'):
34 wm = WiFiManager(shared)
35 return wm
36
37
38# ---------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 1

WiFiManagerClass · 0.90

Tested by

no test coverage detected