summaryrefslogtreecommitdiff
path: root/archaeological_finds/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2021-10-13 14:00:43 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2021-10-25 12:06:03 +0200
commit9c99d9d24568e5650858df6109170dd4c3473d86 (patch)
tree9231081c3c8beffd0cb49b259488ed044c950d18 /archaeological_finds/tests.py
parentdd84a22b58113d7541ba55d2eae1e2b9c1082c13 (diff)
downloadIshtar-9c99d9d24568e5650858df6109170dd4c3473d86.tar.bz2
Ishtar-9c99d9d24568e5650858df6109170dd4c3473d86.zip
black formating
Diffstat (limited to 'archaeological_finds/tests.py')
-rw-r--r--archaeological_finds/tests.py29
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 = [