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:
1 parent
16a3d3aa26
commit
24d3c1149d
7 files changed
+14
-55
No files matched your search
@@ -1,16 +1,6 @@
|
||||
"""Import/export bundles (main's tests/test_profile_bundle.py over HTTP)."""
|
||||
|
||||
import pytest
|
||||
|
||||
from helpers import new_id, unique
|
||||
|
||||
|
||||
@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}")
|
||||
from helpers import new_id
|
||||
|
||||
|
||||
def test_profile_round_trip(c, profile):
|
||||
|
||||
Reference in new issue
Block a user