Pytest-minio-mock

Latest version: v0.4.16

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

Scan your dependencies

0.4.16

Bug Fixes
- added a missing parameter `cert_check` to the MockMinioClient.__init__() interface of MockMinioClient, that is present in `minio.Minio.__init__()` but was missing from the mocked class.

For Developers
- Reorganised the tests in smaller test files. Now every class has a dedicated test file mostly for unit testing such as `tests/test_minio_mock_bucket.py`
- and functional tests are in `tests/test_minio_mock.py`
- added tests for the MockMinioClient.__init__() interface to ensure replication of minio.Minio.__init__(). The same technique will be used to ensure the interface of all functions in the future.
- Test is now > 92%

Credits
Thanks to gatagat for raising the issue and creating the pull request.

0.4.15

Bug Fixes
- `get_object()` now raises an error with the code "NoSuchKey" instead of 404, (closing issue 33) (PR 34 by KelvinHong)

Credits
Thanks to KelvinHong for raising the issue and creating the pull request.

0.4.14

Bug Fixes
- Fixed the interface of `fget_object()`, now `fget_object()` returns a stats object,
- Fixed the behaviour of `fget_object() when passed `file_path` nested folders does not exist (closing Issue 31)

Breaking Changes
- `fget_object()` now returns a stat object of type `Object`

For Developers
- Added unit and regression tests for `fget_object()`
- Test coverage > 90%

Credits
Thanks to KelvinHong for raising the issue and suggesting a solution

0.4.13

New Features
- Added stat_object()

For Developers
- Test coverage > 90%

0.3.13

New Features
- Added remove_bucket() (PR by vanatteveldt)

Bug Fixes
- Fixed the default values of arguments in `list_objects()` (PR by vanatteveldt)
- Changed return type of `list_buckets()` to `Bucket` rather than `str` to conform with the `Minio behaviour (potentially a breaking change) (PR by vanatteveldt)
- Wrap self.object iteration in `list_objects()` in a list to allow modification during iteration. (PR by vanatteveldt)

Breaking Changes
- The return type of `list_buckets` has been changed to reflect the actual Minio behavior, this might break tests using `list_buckets()`.

For Developers
- Test coverage > 90%
- Added missing definition for pytest.mark.FUNC to pytest.ini

Credits
Special thanks to vanatteveldt for raising the issue and contributing code

0.2.11

New Features
- Added set_bucket_versioning() and get_bucket_versioning()
- Added support for "versioning" in get_object(), remove_object(), list_objects()

For Developers
- Major code refactoring
- Added the classes MockMinioBucket, MockMinioObject, and MockMinioVersion
- The use of classes allow for encapsulation which provides easier readability and maintainability.
- Added tests to increase test coverage to > 90%

Credits
Special thanks to cottephi for raising the issue and contributing code.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.