I noticed that you've been using these strange indexes to mock_calls; This is really ugly, you're not telling what data you're trying to retrieve, and it gets really hard to understand what the code does.

Also, please don't leave commented code in the codebase. Remember that we're using version control.