I have a loop where I handle adding records to a zip file. I have mocked my zipfile object and I want to raise a exception to verify that my logic for handling large zipfiles will work correctly.

is there a way with MagicMocks or plain mocks to accept the first call, but raise an exception on the second?