matthewdeanmartin / openmock

Python Opensearch Mock for test purposes (fork of elasticmock)
https://pypi.python.org/pypi/openmock
MIT License
12 stars 11 forks source link

exists() method relies on document type unlike opensearchpy #10

Closed sdhoyt closed 1 year ago

sdhoyt commented 1 year ago

Currently, the exists() method in FakeOpenSearch relies on getting a document type that is used alongside the index and document id when checking if a document exists. If a document type is not input, it defaults to None and will return false because it checks, for example, if the document type "_doc" == None.

The opensearchpy implementation does not need a document type input and only needs the index name and document id to check for the existence of the document. In openmock, the exists method should ignore whether the document type matches when the value is None.

I have an update for this ready and can open a pull request.

matthewdeanmartin commented 1 year ago

Ready to run & build & publish it as soon as I see an PR

sdhoyt commented 1 year ago

Thanks! The PR is created

matthewdeanmartin commented 1 year ago

Published 2.3.1 - https://pypi.org/project/openmock/