feat: explain activity data quality
This commit is contained in:
@@ -86,7 +86,17 @@ def test_repeated_reports_from_one_player_do_not_add_unique_player_weight(db: Se
|
||||
|
||||
assert row.catches == 3
|
||||
assert row.unique_players == 1
|
||||
assert "3 свежих уловов от 1 игроков" in row.explanation
|
||||
assert "3 свежих улова от 1 игрока" in row.explanation
|
||||
|
||||
|
||||
def test_explanation_describes_low_data_and_confidence(db: Session) -> None:
|
||||
add_report(db, age_hours=2, player="Player", confidence=50)
|
||||
|
||||
row = activity_rows(db, hours=6, now=NOW)[0]
|
||||
|
||||
assert row.explanation.startswith("Низкая активность: 1 свежий улов от 1 игрока.")
|
||||
assert "Уверенность низкая." in row.explanation
|
||||
assert "Данных мало: нужно хотя бы 3 наблюдения." in row.explanation
|
||||
|
||||
|
||||
def test_pending_rejected_and_deleted_reports_are_excluded(db: Session) -> None:
|
||||
|
||||
Reference in New Issue
Block a user