diff options
Diffstat (limited to 'archaeological_finds/tests.py')
| -rw-r--r-- | archaeological_finds/tests.py | 29 | 
1 files changed, 6 insertions, 23 deletions
| diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index 1c42c28ba..d198d93ee 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -1281,8 +1281,7 @@ class FindSearchTest(FindInit, TestCase, SearchText):      def test_operator_search(self):          operation = self.operations[0]          operator = Organization.objects.create( -            name="My Orga", -            organization_type=OrganizationType.objects.all()[0] +            name="My Orga", organization_type=OrganizationType.objects.all()[0]          )          operation.operator = operator          operation.save() @@ -1291,12 +1290,9 @@ class FindSearchTest(FindInit, TestCase, SearchText):          c.login(username=self.username, password=self.password)          key = str(pgettext_lazy("key for text search", "operator")) -        result = [ -            ('{}="{}"'.format(key, "My Orga"), 1) -        ] +        result = [('{}="{}"'.format(key, "My Orga"), 1)]          self._test_search(c, result, context="Text operator search") -      def test_common_name_operation_search(self):          operation = self.operations[0]          operation.common_name = "Operation Common Name" @@ -1306,12 +1302,9 @@ class FindSearchTest(FindInit, TestCase, SearchText):          c.login(username=self.username, password=self.password)          key = str(pgettext_lazy("key for text search", "operation-name")) -        result = [ -            ('{}="{}"'.format(key, "Operation Common Name"), 1) -        ] +        result = [('{}="{}"'.format(key, "Operation Common Name"), 1)]          self._test_search(c, result, context="Text Operation Common Name Search") -      def test_address_operation_search(self):          operation = self.operations[0]          operation.address = "Street somewhere 29478 NOWHERE" @@ -1321,30 +1314,21 @@ class FindSearchTest(FindInit, TestCase, SearchText):          c.login(username=self.username, password=self.password)          key = str(pgettext_lazy("key for text search", "operation-address")) -        result = [ -            ('{}="{}"'.format(key, "Street somewhere 29478 NOWHERE"), 1) -        ] +        result = [('{}="{}"'.format(key, "Street somewhere 29478 NOWHERE"), 1)]          self._test_search(c, result, context="Text Operation Address Search") -      def test_person_in_charge_search(self):          operation = self.operations[0] -        operation.in_charge = Person.objects.create( -            name="HISNAME", -            surname="Michel" -        ) +        operation.in_charge = Person.objects.create(name="HISNAME", surname="Michel")          operation.save()          c = Client()          c.login(username=self.username, password=self.password)          key = str(pgettext_lazy("key for text search", "in-charge")) -        result = [ -            ('{}="{}"'.format(key, "HISNAME Michel"), 1) -        ] +        result = [('{}="{}"'.format(key, "HISNAME Michel"), 1)]          self._test_search(c, result, context="Text Person In Charge Search") -      def test_conservatory_state_hierarchic_search(self):          find = self.finds[0]          c = Client() @@ -2623,7 +2607,6 @@ class GeomaticTest(FindInit, TestCase):              self.assertEqual(dic["get_pts"], json.loads(response.content)) -  class AutocompleteTest(AutocompleteTestBase, TestCase):      fixtures = FIND_FIXTURES      models = [ | 
