diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-03-30 15:05:00 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-03-30 15:05:00 +0200 |
commit | 1ee8d6d16836c25da4f75bcaf59d6e3f5b24a423 (patch) | |
tree | 38ff03cdcd7b07e4f951638054e8ca93dd4ffa10 /archaeological_warehouse/tests.py | |
parent | 921174babfd04f1da248a4eb4536d882963b4700 (diff) | |
download | Ishtar-1ee8d6d16836c25da4f75bcaf59d6e3f5b24a423.tar.bz2 Ishtar-1ee8d6d16836c25da4f75bcaf59d6e3f5b24a423.zip |
Container: fix index generation when only stationary containers are availables
Diffstat (limited to 'archaeological_warehouse/tests.py')
-rw-r--r-- | archaeological_warehouse/tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/archaeological_warehouse/tests.py b/archaeological_warehouse/tests.py index 503057cdf..e18d56fae 100644 --- a/archaeological_warehouse/tests.py +++ b/archaeological_warehouse/tests.py @@ -1056,6 +1056,10 @@ class ContainerTest(FindInit, TestCase): base_index = q.all()[0].index else: base_index = 0 + container_3 = models.Container.objects.create( + reference="Ref 3", location=self.main_warehouse, container_type=ct2 + ) + self.assertEqual(container_3.index, None) container_1 = models.Container.objects.create( reference="Ref 1", location=self.main_warehouse, container_type=ct ) @@ -1068,10 +1072,6 @@ class ContainerTest(FindInit, TestCase): self.assertEqual( models.Container.objects.get(pk=container_2.pk).index, base_index + 2 ) - container_3 = models.Container.objects.create( - reference="Ref 3", location=self.main_warehouse, container_type=ct2 - ) - self.assertEqual(container_3.index, None) self.assertEqual(models.Container.objects.get(pk=container_3.pk).index, None) container_4 = models.Container.objects.create( reference="Ref 4", location=self.main_warehouse, container_type=ct2 |