diff options
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r-- | archaeological_operations/tests.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 1c2623389..331c24659 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -2153,16 +2153,17 @@ class OperationTest(TestCase, OperationInitTest): operation = self.operations[0] self.assertIsNotNone(operation.cached_label) town, ope_id = operation.cached_label.split(" | ") - self.assertIn(town, ("Intercommunal", "Multi-town")) - self.assertEqual(ope_id, "OA1 - OP2010-1") + self.assertIn(town, ("Pas de commune associée", "No associated town")) + self.assertEqual(ope_id, "OA1") operation = models.Operation.objects.get(pk=operation.pk) operation.year = 2011 + operation.code_patriarche = "" operation.save() operation.towns.add(self.towns[0]) operation = models.Operation.objects.get(pk=operation.pk) self.assertIsNotNone(operation.cached_label) town, ope_id = operation.cached_label.split(" | ") - self.assertEqual(ope_id, "OA1 - OP2011-1") + self.assertEqual(ope_id, "OP2011-1") self.assertEqual(town, self.towns[0].name) def test_search_vector_update(self): @@ -3834,7 +3835,7 @@ class OperationWizardModifTest(WizardTest, OperationInitTest, TestCase): operation = models.Operation.objects.get(pk=test_object.operations[0].pk) town_str = town_2.name test_object.assertEqual( - operation.complete_identifier[:len(town_str)], town_str + operation.cached_label[:len(town_str)], town_str ) self.form_datas[0].extra_tests = [post_first_wizard] |