From e51b6aa55ecb6fdb7e09b615d25bafdef3cc8f28 Mon Sep 17 00:00:00 2001 From: Teodor Date: Wed, 30 Oct 2024 16:12:31 +0200 Subject: [PATCH] run black to format code --- src/plone/restapi/tests/test_search.py | 48 +++++++------------------- 1 file changed, 12 insertions(+), 36 deletions(-) diff --git a/src/plone/restapi/tests/test_search.py b/src/plone/restapi/tests/test_search.py index 64fde4821..84b6e0b48 100644 --- a/src/plone/restapi/tests/test_search.py +++ b/src/plone/restapi/tests/test_search.py @@ -153,50 +153,26 @@ def test_search_on_context_constrains_query_by_path(self): def test_search_with_parentheses(self): query = {"SearchableText": "("} - response = self.api_session.get( - "/@search", - params=query - ) - self.assertEqual( - response.status_code, - 200 - ) + response = self.api_session.get("/@search", params=query) + self.assertEqual(response.status_code, 200) self.assertEqual( - response.json(), - [], - "Expected no items for query with only parentheses" - ) + response.json(), [], "Expected no items for query with only parentheses" + ) query = {"SearchableText": ")"} - response = self.api_session.get( - "/@search", - params=query - ) - self.assertEqual( - response.status_code, - 200 - ) + response = self.api_session.get("/@search", params=query) + self.assertEqual(response.status_code, 200) self.assertEqual( - response.json(), - [], - "Expected no items for query with only parentheses" - ) + response.json(), [], "Expected no items for query with only parentheses" + ) query = {"SearchableText": "lorem(ipsum)"} - response = self.api_session.get( - "/@search", - params=query - ) - self.assertEqual( - response.status_code, - 200 - ) + response = self.api_session.get("/@search", params=query) + self.assertEqual(response.status_code, 200) items = [item["title"] for item in response.json().get("items", [])] self.assertIn( - "Lorem Ipsum", - items, - "Expected 'Lorem Ipsum' to be found in search results" - ) + "Lorem Ipsum", items, "Expected 'Lorem Ipsum' to be found in search results" + ) def test_search_in_vhm(self): # Install a Virtual Host Monster