Sanitize Control Center test fixtures

This commit is contained in:
Gabriel Brown
2026-08-17 13:44:23 -04:00
parent 5940d6b4bd
commit 5f965daa6a
3 changed files with 13 additions and 13 deletions
@@ -88,12 +88,12 @@ Create `tests/quickshell/kdeconnect_bridge_test.py` with import-by-path and thes
```python
class KdeConnectBridgeTest(unittest.TestCase):
def test_status_omits_network_and_exposes_supported_ios_actions(self):
listing = "- Gib's iPhone: 90B54E84548E4F109268EC2D0E7D6930 on 192.168.1.7 via LAN (paired and reachable)\n1 device found\n"
listing = "- Fixture iPhone: BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB on 192.0.2.7 via LAN (paired and reachable)\n1 device found\n"
plugins = ["kdeconnect_clipboard", "kdeconnect_findmyphone", "kdeconnect_ping", "kdeconnect_share"]
device = bridge.normalize_device_line(listing.splitlines()[0], plugins)
self.assertEqual(device["name"], "Gib's iPhone")
self.assertEqual(device["name"], "Fixture iPhone")
self.assertEqual(device["actions"], ["clipboard", "ping", "ring", "share"])
self.assertNotIn("192.168.1.7", json.dumps(device))
self.assertNotIn("192.0.2.7", json.dumps(device))
def test_invalid_device_id_is_rejected(self):
with self.assertRaisesRegex(ValueError, "invalid-device"):
@@ -105,8 +105,8 @@ class KdeConnectBridgeTest(unittest.TestCase):
bridge.validate_file(pathlib.Path(directory))
def test_action_command_uses_separate_arguments(self):
command = bridge.action_command("ring", "90B54E84548E4F109268EC2D0E7D6930")
self.assertEqual(command, ["kdeconnect-cli", "-d", "90B54E84548E4F109268EC2D0E7D6930", "--ring"])
command = bridge.action_command("ring", "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB")
self.assertEqual(command, ["kdeconnect-cli", "-d", "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", "--ring"])
```
- [ ] **Step 2: Run the test and verify RED**
@@ -46,7 +46,7 @@ the paired iPhone exposes only a useful subset of KDE Connect.
## Verified system state
KDE Connect currently reports one paired and reachable device: `Gib's iPhone`.
KDE Connect currently reports one paired iPhone.
Its live D-Bus object exposes clipboard, find-my-phone, ping, share, and battery
plugins. The battery plugin has no value, and the remote-input object exposes no
callable control methods. Panama must derive action visibility from advertised