aboutsummaryrefslogtreecommitdiff
path: root/tests/models/thl/test_buyer.py
blob: eebb828cced89592ccb5faa5e3495129ec3c3566 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from generalresearch.models import Source
from generalresearch.models.thl.survey.buyer import BuyerCountryStat


def test_buyer_country_stat():
    bcs = BuyerCountryStat(
        country_iso="us",
        source=Source.TESTING,
        code="123",
        task_count=100,
        conversion_alpha=40,
        conversion_beta=190,
        dropoff_alpha=20,
        dropoff_beta=50,
        long_fail_rate=1,
        loi_excess_ratio=1,
        user_report_coeff=1,
        recon_likelihood=0.05,
    )
    assert bcs.score
    print(bcs.score)
    print(bcs.conversion_p20)
    print(bcs.dropoff_p60)