Skip to content

Commit 88c286d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent f34437f commit 88c286d

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

tests/test_client.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -768,30 +768,17 @@ def test_build_json_doc_matches_xml(self):
768768
self.assertIsNone(doc_xml.find("*[name='title']"))
769769

770770
def test__build_docs_plain(self):
771-
docs = [{
772-
"id": "doc_1",
773-
"title": "",
774-
"price": 12.59,
775-
"popularity": 10
776-
}]
771+
docs = [{"id": "doc_1", "title": "", "price": 12.59, "popularity": 10}]
777772
solrapi, m, len_message = self.solr._build_docs(docs)
778773
self.assertEqual(solrapi, "JSON")
779774

780775
def test__build_docs_boost(self):
781-
docs = [{
782-
"id": "doc_1",
783-
"title": "",
784-
"price": 12.59,
785-
"popularity": 10
786-
}]
776+
docs = [{"id": "doc_1", "title": "", "price": 12.59, "popularity": 10}]
787777
solrapi, m, len_message = self.solr._build_docs(docs, boost={"title": 10.0})
788778
self.assertEqual(solrapi, "XML")
789779

790780
def test__build_docs_field_updates(self):
791-
docs = [{
792-
"id": "doc_1",
793-
"popularity": 10
794-
}]
781+
docs = [{"id": "doc_1", "popularity": 10}]
795782
solrapi, m, len_message = self.solr._build_docs(
796783
docs, fieldUpdates={"popularity": "inc"}
797784
)

tests/test_cloud.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import unittest
66

77
import six
8+
89
from pysolr import SolrCloud, SolrError, ZooKeeper, json
910

1011
from .test_client import SolrTestCase
@@ -58,15 +59,19 @@ def test_invalid_collection(self):
5859
def test__create_full_url(self):
5960
# Nada.
6061
six.assertRegex(
61-
self, self.solr._create_full_url(path=""), r"http://localhost:89../solr/core0$"
62+
self,
63+
self.solr._create_full_url(path=""),
64+
r"http://localhost:89../solr/core0$",
6265
)
6366
# Basic path.
6467
six.assertRegex(
65-
self, self.solr._create_full_url(path="pysolr_tests"),
68+
self,
69+
self.solr._create_full_url(path="pysolr_tests"),
6670
r"http://localhost:89../solr/core0/pysolr_tests$",
6771
)
6872
# Leading slash (& making sure we don't touch the trailing slash).
6973
six.assertRegex(
70-
self, self.solr._create_full_url(path="/pysolr_tests/select/?whatever=/"),
74+
self,
75+
self.solr._create_full_url(path="/pysolr_tests/select/?whatever=/"),
7176
r"http://localhost:89../solr/core0/pysolr_tests/select/\?whatever=/",
7277
)

0 commit comments

Comments
 (0)