Skip to content

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

Open
wants to merge 7 commits into
base: ticket/SG-38306-python2-removal-mimetypes
Choose a base branch
from

Conversation

@julien-lang julien-lang force-pushed the ticket/SG-38306-python2-removal-mock branch from f533371 to e93ed1e Compare July 17, 2025 14:50
@julien-lang julien-lang requested a review from Copilot July 17, 2025 16:17
Copy link
Contributor

@Copilot Copilot AI left a 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 removed tests/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)

@julien-lang julien-lang marked this pull request as ready for review July 17, 2025 16:25
@julien-lang julien-lang requested a review from a team July 17, 2025 16:25
Copy link
Contributor

@carlos-villavicencio-adsk carlos-villavicencio-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants