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

fix test has_calls #1898

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sfc-gh-vtimofeenko
Copy link

@sfc-gh-vtimofeenko sfc-gh-vtimofeenko commented Nov 25, 2024

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

Tests on python 3.12 are failing with:

$ pytest -k 'test_generate_jwt_with_passphrase'
FAILED tests/test_connection.py::test_generate_jwt_with_passphrase[pass123] - AttributeError: 'has_calls' is not a valid assertion. Use a spec for the mock if 'has_calls' is meant to be an attribute.
FAILED tests/test_connection.py::test_generate_jwt_with_passphrase[] - AttributeError: 'has_calls' is not a valid assertion. Use a spec for the mock if 'has_calls' is meant to be an attribute.

This commit fixes has_calls usage by replacing it with assert_has_calls

@sfc-gh-vtimofeenko sfc-gh-vtimofeenko requested a review from a team as a code owner November 25, 2024 21:21
Tests on python 3.12 are failing with:

```
$ pytest -k 'test_generate_jwt_with_passphrase'
FAILED tests/test_connection.py::test_generate_jwt_with_passphrase[pass123] - AttributeError: 'has_calls' is not a valid assertion. Use a spec for the mock if 'has_calls' is meant to be an attribute.
FAILED tests/test_connection.py::test_generate_jwt_with_passphrase[] - AttributeError: 'has_calls' is not a valid assertion. Use a spec for the mock if 'has_calls' is meant to be an attribute.
```

This commit fixes has_calls usage by replacing it with assert_has_calls
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.

1 participant