Enhance device MAC address handling in tests to ensure lowercase normalization and skip tests when web protection is disabled

This commit is contained in:
Jokob @NetAlertX
2026-03-02 10:42:36 +00:00
parent 3a73817048
commit bc4f419927
3 changed files with 35 additions and 11 deletions

View File

@@ -99,9 +99,9 @@ def test_copy_device(client, api_token, test_mac):
)
assert resp.status_code == 200
# Step 2: Generate a target MAC
# Step 2: Generate a target MAC (lowercase to match DB trigger normalisation)
target_mac = "aa:bb:cc:" + ":".join(
f"{random.randint(0, 255):02X}" for _ in range(3)
f"{random.randint(0, 255):02x}" for _ in range(3)
)
# Step 3: Copy device