tags:

views:

23

answers:

1

I have a function A that call another function B several times. I want to mock B in such a way that any number of calls that have the correct number of arguments, regardless of value, will return a fixed vale and be treated as correct.

If or how many times the the function is called is not a part of the spec.

+1  A: 
def B(*args, **kwds):
   return 'fixed value'
nosklo
And how do I use that with mox?: http://code.google.com/p/pymox/wiki/MoxDocumentation
BCS