This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jekin000
Recipients jekin000, rbcollins
Date 2016-04-14.07:43:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460619804.34.0.222553592589.issue26752@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import mock
>>> print mock.__version__
2.0.0
>>> 

=================
test.py
from mock import Mock,call

class BB(object):
    def __init__(self):pass
    def print_b(self):pass
    def print_bb(self,tsk_id):pass


bMock = Mock(return_value=Mock(spec=BB))
bMock().print_bb(20)
bMock().assert_has_calls([call.print_bb(20)])


===================
Traceback (most recent call last):
  File "test.py", line 11, in <module>
    bMock().assert_has_calls([call.print_bb(20)])
  File "/usr/lib/python2.7/site-packages/mock/mock.py", line 969, in assert_has_calls
    ), cause)
  File "/usr/lib/python2.7/site-packages/six.py", line 718, in raise_from
    raise value
AssertionError: Calls not found.
Expected: [call.print_bb(20)]
Actual: [call.print_bb(20)]

=======
print expected in mock.py assert_has_calls()

result is:
[TypeError('too many positional arguments',)]
History
Date User Action Args
2016-04-14 07:43:24jekin000setrecipients: + jekin000, rbcollins
2016-04-14 07:43:24jekin000setmessageid: <1460619804.34.0.222553592589.issue26752@psf.upfronthosting.co.za>
2016-04-14 07:43:24jekin000linkissue26752 messages
2016-04-14 07:43:24jekin000create