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 924e205ed..153220125 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -1263,8 +1263,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() @@ -1273,12 +1272,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" @@ -1288,12 +1284,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" @@ -1303,30 +1296,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() @@ -2605,7 +2589,6 @@ class GeomaticTest(FindInit, TestCase): self.assertEqual(dic["get_pts"], json.loads(response.content)) - class AutocompleteTest(AutocompleteTestBase, TestCase): fixtures = FIND_FIXTURES models = [ |