From [the docs](http://www.voidspace.org.uk/python/mock/mock.html):

> If side_effect is an iterable then each call to the mock will return the next value from the iterable. If any of the members of the iterable are exceptions they will be raised instead of returned.