aboutsummaryrefslogtreecommitdiff
path: root/tests/managers/thl/test_profiling/test_schema.py
diff options
context:
space:
mode:
authorMax Nanis2026-08-26 09:17:39 -0700
committerMax Nanis2026-08-26 09:17:39 -0700
commit47ea200eac0eaa7bef02f6ebb05de9afad5ee0d7 (patch)
tree0721a0145bf9db795ef442ca211caf9db2fad420 /tests/managers/thl/test_profiling/test_schema.py
parent3b4059135be47f7752a08e4277a85f9e57ceaa9d (diff)
downloadgeneralresearch-47ea200eac0eaa7bef02f6ebb05de9afad5ee0d7.tar.gz
generalresearch-47ea200eac0eaa7bef02f6ebb05de9afad5ee0d7.zip
Ruff morning!
Diffstat (limited to 'tests/managers/thl/test_profiling/test_schema.py')
-rw-r--r--tests/managers/thl/test_profiling/test_schema.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/managers/thl/test_profiling/test_schema.py b/tests/managers/thl/test_profiling/test_schema.py
index ae61527..b0eae31 100644
--- a/tests/managers/thl/test_profiling/test_schema.py
+++ b/tests/managers/thl/test_profiling/test_schema.py
@@ -1,9 +1,18 @@
+from collections.abc import Callable
+
+from generalresearch.managers.thl.profiling.schema import (
+ UpkSchemaManager,
+)
from generalresearch.models.thl.profiling.upk_property import PropertyType
class TestUpkSchemaManager:
- def test_get_props_info(self, upk_schema_manager, upk_data):
+ def test_get_props_info(
+ self, upk_schema_manager: UpkSchemaManager, upk_data: Callable[..., None]
+ ):
+ upk_data()
+
props = upk_schema_manager.get_props_info()
assert (
len(props) == 16955
@@ -35,10 +44,10 @@ class TestUpkSchemaManager:
assert age.prop_type == PropertyType.UPK_NUMERICAL
assert age.gold_standard
- cars = [
+ cars = next(
x
for x in props
if x.country_iso == "us" and x.property_label == "household_auto_type"
- ][0]
+ )
assert not cars.gold_standard
assert cars.categories[0].label == "Autos & Vehicles"