Removing objective_thread_pitch from scopes_info

This commit is contained in:
Ian Roddis committed 2026-08-17 15:48:50 -03:00
1 parent 067ddffbe5
commit 292830ae0f
10 files changed
+29 -23

No files matched your search

-2
View File
@@ -38,7 +38,6 @@ async def _seed_part_with_fit(db):
augmented_part_id=scope.id,
magnification_min=3,
magnification_max=18,
objective_thread_pitch="M52x0.75",
)
)
ap_s = AttachmentPoint(augmented_part_id=scope.id, attachment_point_name_id=apn.id)
@@ -80,7 +79,6 @@ async def test_detail_shows_attributes_and_fits_readonly(
# Attributes
assert "Alpha 3-18x50" in body
assert "ALP-318" in body
assert "M52x0.75" in body # scope info
assert "Objective" in body # attachment point
# Fits are shown (the other part in the fit)
assert "Flip cover 50mm" in body
-4
View File
@@ -49,7 +49,6 @@ async def _seed_guide_data(db):
magnification_min=3,
magnification_max=18,
objective_lens_diameter_mm=50,
objective_thread_pitch="M52x0.75",
)
)
@@ -222,7 +221,6 @@ async def test_scopes_page_renders_rows_and_fits(
assert "Alpha 3-18x50" in body # scope row
assert "Flip cover 50mm" in body # a matching part in a fit column
assert "fit-badge-exact" in body # the exact fit badge
assert "M52x0.75" in body # scope info: objective thread
assert "3-18" in body # magnification range, integral values un-padded
@@ -294,9 +292,7 @@ async def test_scopes_page_renders_objective_attachment_point_thread(
resp = await client.get("/scopes")
assert resp.status_code == 200
body = resp.text
# The attachment point's thread spec wins over ScopeInfo.objective_thread_pitch.
assert "M44.0×0.5" in body
assert "M52x0.75" not in body
@pytest.mark.asyncio
-3
View File
@@ -26,7 +26,6 @@ HEADERS = [
"url",
"ocular_outer_diameter_mm",
"ocular_fit",
"objective_thread_pitch",
"objective_thread",
"objective_fit",
]
@@ -59,7 +58,6 @@ def _scope_row(**overrides):
"url": "https://example.com/viper",
"ocular_outer_diameter_mm": 40,
"ocular_fit": None,
"objective_thread_pitch": "0.75",
"objective_thread": "M40x0.75",
"objective_fit": None,
}
@@ -142,7 +140,6 @@ async def test_import_creates_scope_with_info_and_attachment_points(db_sessionma
assert info.magnification_max == 25
assert info.model_suffix == "PST"
assert info.objective_lens_diameter_mm == 56
assert info.objective_thread_pitch == "0.75"
aps = await attachment_point_crud.list_for_augmented_part(db, part.id)
by_label = {}