We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As of #20, QuerySet-returning methods on SharedMocks returned by QuerySetMock no longer have normal Mock-like behaviors:
QuerySet
SharedMocks
QuerySetMock
>>> from django.conf import settings >>> settings.configure() >>> from mock_django.query import QuerySetMock >>> qs = QuerySetMock(None, 1, 2, 3) >>> qs.filter.assert_called_with('boo') Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'function' object has no attribute 'assert_called_with'
This is a regression, since this worked as of c45d4c8:
>>> from django.conf import settings >>> settings.configure() >>> from mock_django.query import QuerySetMock >>> qs = QuerySetMock(None, 1, 2, 3) >>> qs.filter.assert_called_with('boo') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/jboyd/envs/mock-django/lib/python2.7/site-packages/mock.py", line 831, in assert_called_with raise AssertionError('Expected call: %s\nNot called' % (expected,)) AssertionError: Expected call: filter('boo') Not called >>> qs.filter('boo') <generator object _iterator at 0x10ba334b0> >>> qs.filter.assert_called_with('boo')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
As of #20,
QuerySet
-returning methods onSharedMocks
returned byQuerySetMock
no longer have normal Mock-like behaviors:This is a regression, since this worked as of c45d4c8:
The text was updated successfully, but these errors were encountered: