-
Notifications
You must be signed in to change notification settings - Fork 205
SG-38306 Python2 Removal - Part 5 - Remove deprecated backported mock module #402
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
base: ticket/SG-38306-python2-removal-mimetypes
Are you sure you want to change the base?
SG-38306 Python2 Removal - Part 5 - Remove deprecated backported mock module #402
Conversation
33e5200
to
c4d1e30
Compare
f533371
to
e93ed1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the deprecated backported mock
module and updates tests to use Python’s built-in unittest.mock
.
- Deleted the standalone
tests/mock.py
and its imports - Replaced patch and mock references with
unittest.mock
calls - Updated
.flake8
to stop excluding the removedtests/mock.py
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/test_unit.py | Removed from .mock import patch , updated decorators to use mock.patch but needs to import mock |
tests/test_client.py | Switched to unittest.mock for all mock calls |
tests/test_api.py | Switched to unittest.mock and removed legacy imports |
tests/mock.py | Deleted deprecated backported mock implementation |
tests/base.py | Switched to unittest.mock in setup helpers |
.flake8 | Removed tests/mock.py from exclude list |
Comments suppressed due to low confidence (1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Remove now deprecated copy of the mock module.
We prefer to use Python's default unittest.mock module instead.
PR orders
WIP