Question about verify() behavior

5 views
Skip to first unread message

r.

unread,
Mar 28, 2009, 8:26:48 AM3/28/09
to mockito-python
In the second test method of the demo test:

<pre>
def testVerification(self):
# create a mock
mock = Mock()

# use the mock
mock.getStuff()

# verify the interactions
verify(mock).doStuff()
</pre>

I do not understand why the test passes. Should not the correct verify
be <pre>verify(mock).getStuff()</pre>? Or should the test fail and
tell that <pre>doStuff()</pre> has never been called?

r.

szczepiq

unread,
Mar 30, 2009, 9:58:23 AM3/30/09
to mockito...@googlegroups.com
Well spotted. This does not make much sense to me. Let me have a look at it.

Thanks,
Szczepan

szczepiq

unread,
Mar 30, 2009, 10:53:17 AM3/30/09
to mockito...@googlegroups.com
I know what's up.

We didn't put the info about moving sources to bitbucket and you've
got an old version now.

Check out the wiki now: there is a link to latest downloadable /
bitbucket pages:
http://code.google.com/p/mockito/wiki/MockitoForPython

Thanks & sorry for misinformation.
Szczepan Faber

Bartosz Bańkowski

unread,
Mar 30, 2009, 11:00:51 AM3/30/09
to mockito...@googlegroups.com
I think it would be a good idea to remove the sources from Subversion
to avoid confusion in future :)

Regards,
Bartosz

szczepiq

unread,
Mar 30, 2009, 11:29:20 AM3/30/09
to mockito...@googlegroups.com
I removed it already :)

Szczepan

2009/3/30 Bartosz Bańkowski <bbank...@gmail.com>:

r.

unread,
Mar 30, 2009, 12:22:43 PM3/30/09
to mockito-python

Thanks. I have downloaded the new version and am looking at it.
r.

On Mar 30, 3:53 pm, szczepiq <szcze...@gmail.com> wrote:
> I know what's up.
>
> We didn't put the info about moving sources to bitbucket and you've
> got an old version now.
>
> Check out the wiki now: there is a link to latest downloadable /
> bitbucket pages:http://code.google.com/p/mockito/wiki/MockitoForPython
>
> Thanks & sorry for misinformation.
> Szczepan Faber
>
> On Mon, Mar 30, 2009 at 3:58 PM, szczepiq <szcze...@gmail.com> wrote:
> > Well spotted. This does not make much sense to me. Let me have a look at it.
>
> > Thanks,
> > Szczepan
>

szczepiq

unread,
Mar 30, 2009, 2:20:33 PM3/30/09
to mockito...@googlegroups.com
Great,

Feel free to send feedback or suggestions.
Szczepan Faber
Reply all
Reply to author
Forward
0 new messages