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

Wrong usage of mock.called_once #121

Open
StephanHasler opened this issue Jan 17, 2022 · 2 comments
Open

Wrong usage of mock.called_once #121

StephanHasler opened this issue Jan 17, 2022 · 2 comments
Assignees
Labels
bug Something isn't working should

Comments

@StephanHasler
Copy link
Contributor

In several test files the called_once method of mock is used without the required parentheses ().
In this way the called_once statements have no effect, the tests seem to succeed, but actually nothing is tested.

See for example:

mock_import_module.assert_called_once

In

mock_sys_modules.assert_called_once
there is a further bug, besides the missing parentheses.
It should not be checked that the mock is called_once but its getitem method.

@hyounesy hyounesy added the bug Something isn't working label Jan 25, 2022
@hyounesy
Copy link
Contributor

[AIRO-1689]

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

This issue has been marked stale because it has been open for 14 days with no activity. Please remove the stale label or comment on this issue, or the issue will be automatically closed in the next 14 days.

@github-actions github-actions bot added the stale Inactive label Feb 9, 2022
@at669 at669 added should and removed stale Inactive labels Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working should
Projects
None yet
Development

No branches or pull requests

4 participants