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

Provide mocker.call name #48

Closed
jhermann opened this issue May 31, 2016 · 1 comment
Closed

Provide mocker.call name #48

jhermann opened this issue May 31, 2016 · 1 comment

Comments

@jhermann
Copy link
Contributor

In order to use the assert_has_calls check, you need the call name. I think it should be part of the set of 'convenience' names available via mocker.

The end goal is to make this work::

get_pwd = mocker.patch('keyring.get_password')
…
get_pwd.assert_has_calls(
    mocker.call(Credentials.KEYRING_SERVICE_DEFAULT, '[email protected]'),
    mocker.call(Credentials.KEYRING_SERVICE_DEFAULT, 'keyring.example.com'))

If you agree it should be available, I can do a PR.

@nicoddemus
Copy link
Member

Sure, sounds good. A PR would be appreciated! 😁

Just a heads up before you contribute: the license for the new yet to be released version is now MIT (#45).

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

No branches or pull requests

2 participants