I have a method, which calls another method twice, with different arguments.
class A(object):
def helper(self, arg_one, arg_two):
"""Return something which depends on arguments."""
def caller(self):
value_1 = self.helper(foo, bar) # First call.
value_2 = self.helper(foo_bar, bar_foo) # Second call!
Using assert_called_with helps me asserting just the first call, and not the second one. Even assert_called_once_with doesn't seem to be helpful. What am I missing here? Is there any way to test such calls?