Fixing errors and danger zone
This commit is contained in:
1 parent
392b79e801
commit
2a0b8fcab2
4 files changed
+12
-14
No files matched your search
@@ -132,20 +132,17 @@ async def test_purge_wipes_domain_data_but_keeps_users_and_odata_config(
|
||||
FitNote,
|
||||
ImportedPart,
|
||||
ScopeModel,
|
||||
SubPartType,
|
||||
PartType,
|
||||
AttachmentPointName,
|
||||
IsoThread,
|
||||
UncThread,
|
||||
ClampConnection,
|
||||
StaticConnection,
|
||||
PartColour,
|
||||
Manufacturer,
|
||||
):
|
||||
rows = (await db.execute(Model.__table__.select())).all()
|
||||
assert rows == [], f"{Model.__name__} should be empty after purge"
|
||||
|
||||
# Kept: users, RBAC, and the OData connection config.
|
||||
# Kept: users, RBAC, the OData connection config, and part taxonomy.
|
||||
from app.crud import user as user_crud
|
||||
|
||||
assert await user_crud.get_by_email(db, "root@example.com") is not None
|
||||
@@ -153,5 +150,9 @@ async def test_purge_wipes_domain_data_but_keeps_users_and_odata_config(
|
||||
assert config is not None
|
||||
assert config.odata_url == "https://example.test/odata"
|
||||
|
||||
for Model in (PartColour, PartType, SubPartType):
|
||||
rows = (await db.execute(Model.__table__.select())).all()
|
||||
assert rows != [], f"{Model.__name__} should survive the purge"
|
||||
|
||||
entries = await audit_crud.list_recent(db)
|
||||
assert any("Purged all domain data" in e.description for e in entries)
|
||||
@@ -275,7 +275,7 @@ async def test_scopes_page_renders_objective_attachment_point_thread(
|
||||
assert resp.status_code == 200
|
||||
body = resp.text
|
||||
# The attachment point's thread spec wins over ScopeInfo.objective_thread_pitch.
|
||||
assert "M44×0.5" in body
|
||||
assert "M44.0×0.5" in body
|
||||
assert "M52x0.75" not in body
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user