derwiki-adroll / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

assert call with dont-care placeholders #163

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Often I want to check if a specific call has been made, but don't (or can't) 
compare one of the arguments in that call. It would be convenient if you could 
do something like this:

mock.assert_called_with('pizza', count=1, topping=DONTCARE)

Which would check that a topping argument was present, but the actual value is 
not checked. 

Original issue reported on code.google.com by wich...@wiggy.net on 20 Jun 2012 at 8:57

GoogleCodeExporter commented 9 years ago
The time machine strikes again!

    mock.assert_called_with('pizza', count=1, topping=ANY)

ANY is already in mock.

Original comment by fuzzyman on 20 Jun 2012 at 9:51