aboutsummaryrefslogtreecommitdiff
path: root/tests/managers/thl/test_product_prod.py
diff options
context:
space:
mode:
authorMax Nanis2026-08-25 11:09:52 -0700
committerMax Nanis2026-08-25 11:09:52 -0700
commit3b4059135be47f7752a08e4277a85f9e57ceaa9d (patch)
tree122561f7cc99aeb2933a4fc37d07b3eecd514701 /tests/managers/thl/test_product_prod.py
parent5682f48a96b0713929a4bb52e72eec5907d5dd32 (diff)
downloadgeneralresearch-3b4059135be47f7752a08e4277a85f9e57ceaa9d.tar.gz
generalresearch-3b4059135be47f7752a08e4277a85f9e57ceaa9d.zip
Ruff typing from this morning. WIP
Diffstat (limited to 'tests/managers/thl/test_product_prod.py')
-rw-r--r--tests/managers/thl/test_product_prod.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/managers/thl/test_product_prod.py b/tests/managers/thl/test_product_prod.py
index f5aa78d..0f622b6 100644
--- a/tests/managers/thl/test_product_prod.py
+++ b/tests/managers/thl/test_product_prod.py
@@ -10,7 +10,7 @@ logger = logging.getLogger()
class TestProductManagerGetMethods:
- def test_get_by_uuid(self, product_manager, product_factory):
+ def test_get_by_uuid(self, product_manager: ProductManager, product_factory):
# Just test that we load properly
for p in [product_factory(), product_factory(), product_factory()]:
instance = product_manager.get_by_uuid(product_uuid=p.id)
@@ -22,7 +22,7 @@ class TestProductManagerGetMethods:
product_manager.get_by_uuid(product_uuid=uuid4().hex)
assert "product not found" in str(cm.value)
- def test_get_by_uuids(self, product_manager, product_factory):
+ def test_get_by_uuids(self, product_manager: ProductManager, product_factory):
products = [product_factory(), product_factory(), product_factory()]
cnt = len(products)
res = product_manager.get_by_uuids(product_uuids=[p.id for p in products])
@@ -42,7 +42,9 @@ class TestProductManagerGetMethods:
)
assert "invalid uuid passed" in str(cm.value)
- def test_get_by_uuid_if_exists(self, product_factory, product_manager):
+ def test_get_by_uuid_if_exists(
+ self, product_factory: Callable[..., Product], product_manager
+ ):
products = [product_factory(), product_factory(), product_factory()]
instance = product_manager.get_by_uuid_if_exists(product_uuid=products[0].id)
@@ -51,7 +53,9 @@ class TestProductManagerGetMethods:
instance = product_manager.get_by_uuid_if_exists(product_uuid="abc123")
assert instance is None
- def test_get_by_uuids_if_exists(self, product_manager, product_factory):
+ def test_get_by_uuids_if_exists(
+ self, product_manager: ProductManager, product_factory
+ ):
products = [product_factory(), product_factory(), product_factory()]
res = product_manager.get_by_uuids_if_exists(