test(api): share one profile() fixture in conftest

Six test files each defined the same profile() fixture. It now lives once
in conftest.py, with test_profiles.py's 201 check on create.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jimmyandClaude Opus 5.5 committed 2026-11-04 01:35:56 +13:00
1 parent 16a3d3aa26
commit 24d3c1149d
7 files changed
+14 -55

No files matched your search

-8
View File
@@ -7,14 +7,6 @@ from helpers import find_id_by_field, new_id, unique
MAC = "aabbccddee01" # made up: no driver answers it
@pytest.fixture
def profile(c):
pid = new_id(c.post("/profiles", json={"name": unique("pytest-profile")}))
assert c.post(f"/profiles/{pid}/apply").status_code == 200
yield pid
c.delete(f"/profiles/{pid}")
@pytest.fixture
def device(c):
c.delete(f"/devices/{MAC}")