Mockupdb

Latest version: v1.8.0

Safety actively analyzes 681881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.8.0

------------------

MockupDB supports Python 3.4 through 3.8; it no longer supports Python 2.6 or
Python 3.3.

New method ``MockupDB.append_responder`` to add an autoresponder of last resort.

Fix a bug in ``interactive_server`` with ``all_ok=True``. It had returned an
empty isMaster response, causing drivers to throw errors like "Server at
localhost:27017 reports wire version 0, but this version of PyMongo requires at
least 2 (MongoDB 2.6)."

Stop logging "OSError: [WinError 10038] An operation was attempted on something
that is not a socket" on Windows after a client disconnects.

Parse OP_MSGs with any number of sections in any order. This allows write
commands from the mongo shell, which sends sections in the opposite order from
drivers. Handle OP_MSGs with checksums, such as those sent by the mongo shell
beginning in 4.2.

1.7.0

------------------

Improve datetime support in match expressions. Python datetimes have microsecond
precision but BSON only has milliseconds, so expressions like this always
failed::

server.receives(Command('foo', when=datetime(2018, 12, 1, 6, 6, 6, 12345)))

Now, the matching logic has been rewritten to recurse through arrays and
subdocuments, comparing them value by value. It compares datetime values with
only millisecond precision.

1.6.0

------------------

Remove vendored BSON library. Instead, require PyMongo and use its BSON library.
This avoids surprising problems where a BSON type created with PyMongo does not
appear equal to one created with MockupDB, and it avoids the occasional need to
update the vendored code to support new BSON features.

1.5.0

------------------

Support for Unix domain paths with ``uds_path`` parameter.

The ``interactive_server()`` function now prepares the server to autorespond to
the ``getFreeMonitoringStatus`` command from the mongo shell.

1.4.1

------------------

Fix an inadvertent dependency on PyMongo, which broke the docs build.

1.4.0

------------------

Support, and expect, OP_MSG requests from clients. Thanks to Shane Harvey for
the contribution.

Update vendored bson library from PyMongo. Support the Decimal128 BSON type. Fix
Matcher so it equates BSON objects from PyMongo like ``ObjectId(...)`` with
equivalent objects created from MockupDB's vendored bson library.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.