aboutsummaryrefslogtreecommitdiff
path: root/test_utils
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/managers/conftest.py25
-rw-r--r--test_utils/managers/thl/conftest.py11
2 files changed, 5 insertions, 31 deletions
diff --git a/test_utils/managers/conftest.py b/test_utils/managers/conftest.py
index 72be79e..a9f92a2 100644
--- a/test_utils/managers/conftest.py
+++ b/test_utils/managers/conftest.py
@@ -25,7 +25,6 @@ from generalresearch.managers.thl.user_streak import (
)
from generalresearch.managers.thl.userhealth import (
AuditLogManager,
- IPRecordManager,
UserIpHistoryManager,
)
from generalresearch.models.definitions import Source
@@ -57,24 +56,6 @@ def audit_log_manager(thl_web_rw: PostgresConfig) -> AuditLogManager:
@pytest.fixture
-def ip_record_manager(
- thl_web_rw: PostgresConfig,
- thl_redis_config: RedisConfig,
- geoip_info_manager: GeoIpInfoManager,
-) -> IPRecordManager:
- assert thl_web_rw.dsn.path
- assert "/unittest-" in thl_web_rw.dsn.path
-
- from generalresearch.managers.thl.userhealth import IPRecordManager
-
- return IPRecordManager(
- pg_config=thl_web_rw,
- redis_config=thl_redis_config,
- geoip_info_manager=geoip_info_manager,
- )
-
-
-@pytest.fixture
def user_iphistory_manager(
thl_web_rw: PostgresConfig,
thl_redis_config: RedisConfig,
@@ -124,6 +105,11 @@ def grip_lookup_results() -> dict[str, GRIPMMDBLookupResult]:
network_operator="Cloudflare",
),
),
+ "2.2.2.2": GRIPMMDBLookupResult(
+ country=GRIPCountryRecord(country_iso="IT"),
+ anonymous=GRIPAnonymousRecord(is_anonymous=False),
+ asn=GRIPAsnRecord(),
+ ),
},
)
@@ -214,7 +200,6 @@ def random_ext_id_factory(base: str = "U02") -> Callable[..., str]:
@pytest.fixture(scope="session")
def example_tango_cashout_methods(
- random_ext_id_factory: Callable[..., str],
) -> list[CashoutMethod]:
return [
CashoutMethod(
diff --git a/test_utils/managers/thl/conftest.py b/test_utils/managers/thl/conftest.py
index 5b96680..2dce648 100644
--- a/test_utils/managers/thl/conftest.py
+++ b/test_utils/managers/thl/conftest.py
@@ -40,7 +40,6 @@ if TYPE_CHECKING:
UserMetadataManager,
)
from generalresearch.managers.thl.userhealth import (
- AuditLogManager,
IPRecordManager,
)
from generalresearch.managers.thl.wall import (
@@ -162,13 +161,6 @@ def brokerage_product_payout_event_manager(
)
-@pytest.fixture()
-def audit_log_manager(thl_web_rw: PostgresConfig) -> AuditLogManager:
- from generalresearch.managers.thl.userhealth import AuditLogManager
-
- return AuditLogManager(pg_config=thl_web_rw)
-
-
@pytest.fixture(scope="session")
def business_payout_event_manager(
thl_web_rw: PostgresConfig, thl_redis_config: RedisConfig
@@ -338,9 +330,6 @@ def surveypenalty_manager(thl_redis_config: RedisConfig):
return SurveyPenaltyManager(redis_config=thl_redis_config)
-# --- IP Record ---
-
-
@pytest.fixture(scope="session")
def ip_record_manager(
thl_web_rw: PostgresConfig, thl_redis_config: RedisConfig