Skip to content

Added authentication and https support for Solr and CloudSolr #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 15, 2017

Conversation

MitchellEHolmes
Copy link

Hey, thanks for contributing to pysolr. Please confirm that the tests pass locally

Once your pull request has been submitted, the full test suite will be executed on https://travis-ci.org/django-haystack/pysolr/pull_requests. Pull requests with passing tests are far more likely to be reviewed and merged.

@acdha
Copy link
Collaborator

acdha commented Dec 14, 2017

This looks great – think it makes sense to add a test to confirm that the values passed are actually forwarded on to the requests call?

@MitchellEHolmes
Copy link
Author

MitchellEHolmes commented Dec 14, 2017 via email

@MitchellEHolmes
Copy link
Author

MitchellEHolmes commented Dec 14, 2017 via email

@MitchellEHolmes
Copy link
Author

MitchellEHolmes commented Dec 14, 2017 via email

@acdha
Copy link
Collaborator

acdha commented Dec 15, 2017

Ah, good. I was going to suggest using mock.patch to catch the underlying request so you could verify it was being included – e.g. in the SolrTestCase where setup mocks the _send_request so tests can call methods normally but then confirm that the arguments passed to the request include an expected value:

pysolr/tests/test_client.py

Lines 224 to 226 in 356a5ec

# Mock the _send_request method on the solr instance so that we can
# test that custom handlers are called correctly.
self.solr._send_request = Mock(wraps=self.solr._send_request)

pysolr/tests/test_client.py

Lines 448 to 449 in 356a5ec

args, kwargs = self.solr._send_request.call_args
self.assertTrue(args[1].startswith('select/?'))

@acdha acdha merged commit f3d17f2 into django-haystack:master Dec 15, 2017
@patrickml
Copy link

How long will it be until we get a new release with this feature?

@acdha
Copy link
Collaborator

acdha commented Dec 16, 2017

I just cut 3.7.0

@vvolkman
Copy link

Can we change the version number pysolr.version to match the new branch number?

@acdha
Copy link
Collaborator

acdha commented Dec 18, 2017

It's supposed to be using setuptools_scm for that:

https://github.com/django-haystack/pysolr/blob/master/pysolr.py#L60-L66

That's what I'm seeing after a clean install, too:

Python 2.7.14 (default, Oct 19 2017, 15:50:46) 
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysolr
>>> pysolr.__version__
'3.7.0'
>>> pysolr.get_version()
'3.7.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants