diff options
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 |
commit | 6d2384223d088c43b8bd3cee08fa08a8eabffc0c (patch) | |
tree | d807227809465f384d765a6f55a0a80fa041d661 | |
parent | a3fbef52a106594a5a5295e006b20a960f501806 (diff) | |
download | Ishtar-6d2384223d088c43b8bd3cee08fa08a8eabffc0c.tar.bz2 Ishtar-6d2384223d088c43b8bd3cee08fa08a8eabffc0c.zip |
Tests: fix M2M test (false positive)
-rw-r--r-- | archaeological_finds/tests.py | 4 | ||||
-rw-r--r-- | archaeological_warehouse/models.py | 5 |
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,\ |