summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2020-12-15 23:24:46 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-02-28 12:15:22 +0100
commit2777c68b8727546c17dcb44078d2d1eb0c5ab19f (patch)
treed807227809465f384d765a6f55a0a80fa041d661
parent2c07e363499d674f214088c5110826822351566d (diff)
downloadIshtar-2777c68b8727546c17dcb44078d2d1eb0c5ab19f.tar.bz2
Ishtar-2777c68b8727546c17dcb44078d2d1eb0c5ab19f.zip
Tests: fix M2M test (false positive)
-rw-r--r--archaeological_finds/tests.py4
-rw-r--r--archaeological_warehouse/models.py5
2 files changed, 3 insertions, 6 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py
index 9e63f1ddb..c5d860cad 100644
--- a/archaeological_finds/tests.py
+++ b/archaeological_finds/tests.py
@@ -1268,6 +1268,7 @@ class FindSearchTest(FindInit, TestCase, SearchText):
self._test_search(c, result, context="One container in his "
"reference location")
+
class FindAutocompleteTest(FindInit, TestCase):
fixtures = WAREHOUSE_FIXTURES
model = models.Find
@@ -1799,9 +1800,6 @@ class FindHistoryTest(FindInit, TestCase):
self.assertIn(b'class="card sheet"', response.content)
content = response.content.decode('utf-8')
self.assertNotIn(
- models.MaterialType.objects.get(txt_idx='ceramic').label,
- content)
- self.assertNotIn(
Period.objects.get(txt_idx='neolithic').label, content)
self.assertNotIn("5001", content)
diff --git a/archaeological_warehouse/models.py b/archaeological_warehouse/models.py
index c9bd4b494..8f4d0662e 100644
--- a/archaeological_warehouse/models.py
+++ b/archaeological_warehouse/models.py
@@ -1449,9 +1449,8 @@ class ContainerLocalisation(models.Model):
ordering = ('container', 'division__order')
def __str__(self):
- lbl = " - ".join((str(self.container),
- str(self.division), self.reference))
- return lbl
+ return " - ".join((str(self.container), str(self.division),
+ self.reference))
def natural_key(self):
return self.container.uuid, self.division.warehouse.uuid,\