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

Support mock.create_autospec with spec_set=True #223

Open
bxm156 opened this issue Nov 7, 2017 · 0 comments
Open

Support mock.create_autospec with spec_set=True #223

bxm156 opened this issue Nov 7, 2017 · 0 comments

Comments

@bxm156
Copy link
Member

bxm156 commented Nov 7, 2017

The current models do not support auto speccing. If you attempt to use mock.create_autospec with spec_set=True, you will get

AttributeError: Mock object has no attribute '<attribute name here>'

I think this is due to the way we handle creating and setting properties in https://github.com/Yelp/bravado-core/blob/master/bravado_core/model.py. Not sure how easy or feasible a change this would be based on the current way of doing things. But it would be nice to have.

@bxm156 bxm156 changed the title Support mock.create_autospect with spec_set=True Support mock.create_autospec with spec_set=True Nov 7, 2017
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

1 participant