Case

Latest version: v1.5.3

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

Scan your dependencies

Page 3 of 4

1.1.3

=====
:release-date: 2016-04-19 04:41 p.m. PDT
:release-by: Ask Solem

- ``case.patch(autospec=True)`` now works.

This will use the original mock.MagicMock, not case.MagicMock.

.. _version-1.1.2:

1.1.2

=====
:release-date: 2016-04-08 11:34 p.m. PDT
:release-by: Ask Solem

- Also :func:`case.patch.multiple`, and :func:`case.patch.object`
now gives :class:`case.MagicMock`.

.. _version-1.1.1:

1.1.1

=====
:release-date: 2016-04-08 11:13 p.m. PDT
:release-by: Ask Solem

- :func:`case.patch` now gives :class:`case.MagicMock` (not
``mock.MagicMock``).

.. _version-1.1.0:

1.1.0

=====
:release-date: 2016-04-08 10:00 p.m. PDT
:release-by: Ask Solem

- Adds new Mock methods from Python 3.6:

- ``Mock.assert_called()``
- ``Mock.assert_not_called()``
- ``Mock.assert_called_once()``

- Adds ``Mock.create_patcher()``

Example:

.. code-block:: python

from case import Case, mock

patch_commands = mock.create_patcher('long_name.management.commands')

class test_FooCommand(Case):

patch_commands('FooCommand.authenticate')
def test_foo(self, authenticate):
pass

.. _version-1.0.3:

1.0.3

=====
:release-date: 2016-04-06 04:00 p.m. PDT
:release-by: Ask Solem

- Python 2.6 compatibility.

- ``mock.platform_pyimp`` no longer accepted default value.

.. _version-1.0.2:

1.0.2

=====
:release-date: 2016-04-06 03:46 p.m. PDT
:release-by: Ask Solem

- Adds docstrings

.. _version-1.0.1:

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.