R15: Fix D04/D06/D07 partial completion
D04: Add fish name-based fallback in _auto_publish (was external_id only) D06: Cap confidence at 50% for 1 player, 65% for 2 players D07: Set caught_at=None for community imports (not published_at) D08: Already OK - activity_rows has no top-100 limit - Add Fish import to community_importer.py - Add 2 unit tests for D06 confidence caps - Update test_community_importer.py for D04 name match behavior
This commit is contained in:
@@ -116,9 +116,11 @@ def test_changed_published_record_requires_review_and_reuses_report(db: Session)
|
||||
water = Waterbody(slug="test-lake", name_ru="Тестовое озеро")
|
||||
db.add_all([fish, water])
|
||||
db.commit()
|
||||
# D04: auto-publish now works with name match fallback
|
||||
stage_observations(db, [record() | {"weight_g": 5000}])
|
||||
item = db.scalar(select(ExternalObservation))
|
||||
map_observation(db, item, fish, water)
|
||||
# Item auto-published via name match fallback (D04)
|
||||
assert item.status == "published"
|
||||
report = publish_observation(db, item)
|
||||
report_id = report.id
|
||||
stage_observations(db, [record() | {"weight_g": 6000}])
|
||||
|
||||
Reference in New Issue
Block a user