Python mock call_args_list unpacking tuples for assertion on arguments
I think that many of the difficulties here are wrapped up in the treatment of the “call” object. It can be thought of as a tuple with 2 members (args, kwargs) and so it’s frequently nice to unpack it: args, kwargs = call Once it’s unpacked, then you can make your assertions separately for args … Read more