김동주
unread,Mar 11, 2011, 2:03:55 AM3/11/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mockito-python
I have some trouble, but I'm not sure it is my fault or bug
sample code like that
from mockito import mock, verify, verifyNoMoreInteractions
m = mock()
dic = {'key': 'value1'}
m.add_something(dic)
dic['key'] = 'value2'
m.add_something(dic)
verify(m).add_something({'key': 'value1'})
verify(m).add_something({'key': 'value2'})
verifyNoMoreInteractions(m)
I expect this test code success but, failed
Because add_something store ref of argument (not copy).
I think add_something should store copy of argument.