mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
21 lines
437 B
Python
21 lines
437 B
Python
import pytest
|
|
|
|
from backend.app.bulk_uploads.scoring import score_bucket
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"score,expected",
|
|
[
|
|
(None, None),
|
|
(0.0, "low"),
|
|
(0.5, "low"),
|
|
(0.64, "low"),
|
|
(0.65, "med"),
|
|
(0.84, "med"),
|
|
(0.85, "high"),
|
|
(0.9, "high"),
|
|
(1.0, "high"),
|
|
],
|
|
)
|
|
def test_score_bucket_thresholds(score, expected):
|
|
assert score_bucket(score) == expected
|