I have a list of expected arguments, I need to check if the given function is called with all elements of the list. I came up with this. I know looping is better way.
expected_list = [(1,2,3),(4,5,6)]
real_writer = mock.Mock()
real_writer.write.assert_any_call(expected_list[0])
real_writer.write.assert_any_call(expected_list[1])
Is there any way where I can pass the list itself??