EastAgile / robber.py

BDD / TDD assertion library for Python
MIT License
8 stars 1 forks source link

Called_once_with does not work when there are only kwargs #61

Closed catriuspham closed 7 years ago

hieueastagile commented 7 years ago

Can you give me an example?

catriuspham commented 7 years ago

In:

mock = Mock()
mock(a=4, b=5)
expect(mock).to.be.called_once_with(a=4, b=5)

Out:

BadExpectation: 
A = <Mock id='140268734464408'>
B = no arguments
Z = a=4, b=5
Expected A to be called once with B
Actually called 1 times with Z
catriuspham commented 7 years ago

called_with, any_call also have this problem. I didn't write enough tests. My bad. :sob: