From 8e1c09dc8c0e115c6e7899b44f3fa50dd3fa59b2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 21 Jun 2021 16:44:54 +0200 Subject: Tests: fix dependencies and string evaluation --- ishtar_common/tests.py | 4 +++- ishtar_common/utils_secretary.py | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'ishtar_common') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 85d658160..e535eda4b 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -797,6 +797,7 @@ class SerializationTest(GenericSerializationTest, TestCase): AlterationCauseType, TreatmentEmergencyType, CommunicabilityType, + FunctionalArea ) from archaeological_operations.models import CulturalAttributionType @@ -809,6 +810,7 @@ class SerializationTest(GenericSerializationTest, TestCase): TreatmentEmergencyType, CommunicabilityType, CulturalAttributionType, + FunctionalArea, ): model.objects.create(txt_idx="test", label="Test") @@ -2054,7 +2056,7 @@ class ShortMenuTest(TestCase): ope.save() response = c.get(reverse("shortcut-menu")) self.assertEqual(response.status_code, 200) - self.assertFalse(str(ope.cached_label) in response.content.decode()) + self.assertIn(ope.cached_label, response.content.decode()) # test current is not owned ope.end_date = None diff --git a/ishtar_common/utils_secretary.py b/ishtar_common/utils_secretary.py index 9100dac15..062b43913 100644 --- a/ishtar_common/utils_secretary.py +++ b/ishtar_common/utils_secretary.py @@ -1,6 +1,5 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- - from secretary import Renderer, parseString from xml.parsers.expat import ExpatError, ErrorString @@ -142,7 +141,7 @@ class IshtarSecretaryRenderer(Renderer): return final_xml except ExpatError as e: - if not "result" in locals(): + if "result" not in locals(): result = xml_source ### changes try: -- cgit v1.2.3