Skip to content
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

Use unittest.mock instead of mock #701

Closed
major opened this issue Jun 1, 2022 · 0 comments · Fixed by #702
Closed

Use unittest.mock instead of mock #701

major opened this issue Jun 1, 2022 · 0 comments · Fixed by #702
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@major
Copy link
Contributor

major commented Jun 1, 2022

The mock module is deprecated and Python 3 provides unittest.mock to provide the same functionality.

@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/python-pubsub API. label Jun 1, 2022
@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Jun 2, 2022
@acocuzzo acocuzzo added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. and removed type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jun 9, 2022
@yoshi-automation yoshi-automation removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Jun 9, 2022
acocuzzo added a commit that referenced this issue Sep 21, 2022
* Import mock via unittest.mock

The `mock` module is deprecated and modern versions of Python havd
`mock` available in the `unittest` standard library.

Fixes: #701

Signed-off-by: Major Hayden <major@mhtx.net>
Co-authored-by: Anna Cocuzzo <63511057+acocuzzo@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/python-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants