aboutsummaryrefslogtreecommitdiff
path: root/tests/models/thl
diff options
context:
space:
mode:
authorGreg Stupp2026-09-18 22:39:18 +0000
committerGreg Stupp2026-09-18 22:39:18 +0000
commitb373b992cae3a9628a9cf64387c7b8e286d6e1e0 (patch)
tree5e21759ea2c6925e8f54328fbbac88b6be007648 /tests/models/thl
parent32f30b5ddc600e22e071f7659f1872a18ebf42c7 (diff)
parente3c6a824f4176402e40217c5ce70f837dedc5c3d (diff)
downloadgeneralresearch-b373b992cae3a9628a9cf64387c7b8e286d6e1e0.tar.gz
generalresearch-b373b992cae3a9628a9cf64387c7b8e286d6e1e0.zip
Merges pull request #4 v3.5.0
User Cashout Stuff pulled out of grpc, user ip history enrichments with grip (no maxmind)
Diffstat (limited to 'tests/models/thl')
-rw-r--r--tests/models/thl/test_user_iphistory.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/models/thl/test_user_iphistory.py b/tests/models/thl/test_user_iphistory.py
index b8a0be3..efd5168 100644
--- a/tests/models/thl/test_user_iphistory.py
+++ b/tests/models/thl/test_user_iphistory.py
@@ -1,11 +1,13 @@
from __future__ import annotations
from datetime import UTC, datetime, timedelta
+from uuid import uuid4
from generalresearch.models.thl.user_iphistory import (
UserIPHistory,
UserIPRecord,
)
+from generalresearch.models.thl.user_ref import UserRef
def test_collapse_ip_records():
@@ -33,7 +35,10 @@ def test_collapse_ip_records():
),
UserIPRecord(ip="1.2.3.6", created=now + timedelta(minutes=7)),
]
- iph = UserIPHistory(user_id=1, ips=records)
+ iph = UserIPHistory(
+ user=UserRef(user_id=1, product_user_id=uuid4().hex, product_id=uuid4().hex),
+ ips=records,
+ )
res = iph.collapse_ip_records()
# We should be left with one of the 1.2.3.5 ipv4s,