summaryrefslogtreecommitdiff
path: root/archaeological_warehouse/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2026-01-12 18:27:56 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2026-01-12 18:27:56 +0100
commit43339caea0a1bc7125740746c568fbe536c96d2e (patch)
treed710bb1bff6187bd8389e72641e545326f7a8df7 /archaeological_warehouse/tests.py
parent555868ac554938ce90e181b77971286d7170fdc6 (diff)
downloadIshtar-43339caea0a1bc7125740746c568fbe536c96d2e.tar.bz2
Ishtar-43339caea0a1bc7125740746c568fbe536c96d2e.zip
✅ basic tests for all statistics modality
Diffstat (limited to 'archaeological_warehouse/tests.py')
-rw-r--r--archaeological_warehouse/tests.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/archaeological_warehouse/tests.py b/archaeological_warehouse/tests.py
index ba9c081b6..939145389 100644
--- a/archaeological_warehouse/tests.py
+++ b/archaeological_warehouse/tests.py
@@ -36,6 +36,7 @@ from ishtar_common.tests import (
COMMON_FIXTURES,
create_user,
create_superuser,
+ StatisticsTest
)
from ishtar_common.models import IshtarSiteProfile, ProfileType, UserProfile
@@ -333,6 +334,24 @@ class SerializationTest(GenericSerializationTest, FindInit, TestCase):
)
+class ContainerSearchTest(TestCase, StatisticsTest):
+ fixtures = WAREHOUSE_FIXTURES
+ SEARCH_URL = "get-container"
+ MODEL = models.Container
+
+ def setUp(self):
+ IshtarSiteProfile.objects.get_or_create(slug="default", active=True)
+ self.username, self.password, self.user = create_superuser()
+ ct1 = models.ContainerType.objects.order_by("id").all()[0]
+ self.main_warehouse = models.Warehouse.objects.create(
+ name="Main", warehouse_type=models.WarehouseType.objects.all()[0]
+ )
+ self.container_1 = models.Container.objects.create(
+ reference="1", container_type=ct1,
+ location=self.main_warehouse
+ )
+
+
class WarehouseWizardCreationTest(WizardTest, FindInit, TestCase):
fixtures = WAREHOUSE_FIXTURES
url_name = "warehouse_creation"