aboutsummaryrefslogtreecommitdiff
path: root/tests/models/thl/test_buyer.py
diff options
context:
space:
mode:
authorMax Nanis2026-03-06 16:49:46 -0500
committerMax Nanis2026-03-06 16:49:46 -0500
commit91d040211a4ed6e4157896256a762d3854777b5e (patch)
treecd95922ea4257dc8d3f4e4cbe8534474709a20dc /tests/models/thl/test_buyer.py
downloadgeneralresearch-91d040211a4ed6e4157896256a762d3854777b5e.tar.gz
generalresearch-91d040211a4ed6e4157896256a762d3854777b5e.zip
Initial commitv3.3.4
Diffstat (limited to 'tests/models/thl/test_buyer.py')
-rw-r--r--tests/models/thl/test_buyer.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/models/thl/test_buyer.py b/tests/models/thl/test_buyer.py
new file mode 100644
index 0000000..eebb828
--- /dev/null
+++ b/tests/models/thl/test_buyer.py
@@ -0,0 +1,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)