{"action":"closed","issue":{"url":"https://api.github.com/repos/testing-cabal/mock/issues/242","labels_url":"https://api.github.com/repos/testing-cabal/mock/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/testing-cabal/mock/issues/242/comments","events_url":"https://api.github.com/repos/testing-cabal/mock/issues/242/events","html_url":"https://github.com/testing-cabal/mock/issues/242","id":69949970,"number":242,"title":"side_effect Does Not Work With autospec","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/testing-cabal/mock/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/testing-cabal/mock/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/testing-cabal/mock/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-21T20:54:48Z","updated_at":"2015-07-14T00:40:15Z","closed_at":"2015-07-14T00:40:15Z","body":"```\nWhat steps will reproduce the problem?\n1. Run the attached file: python test.py\n\nWhat is the expected output? What do you see instead?\nExpected: Both tests pass.\nResult: One test fails with this stack trace:\n\n===================================================\nERROR: test_show_side_effect_bug (__main__.BugTestCase)\n----------------------------------------------------------------------\nTraceback (most recent call last):\n  File \"test.py\", line 18, in test_show_side_effect_bug\n    self.assertIs(A().f1(), 1)\n  File \"<string>\", line 3, in f1\n  File \"python2.7/site-packages/mock.py\", line 955, in __call__\n    return _mock_self._mock_call(*args, **kwargs)\n  File \"python2.7/site-packages/mock.py\", line 1013, in _mock_call\n    result = next(effect)\nTypeError: list object is not an iterator\n\n----------------------------------------------------------------------\n\nWhat version of the product are you using? On what operating system?\nMock==1.0.1\nOSX 10.9.5\n\nPlease provide any additional information below.\nDoesn't seem to be a high priority, since the workaround is easy. I'm guessing \nfix will come either around line 1007 in mock.py, or somewhere earlier in the \nautospec-specific code.\n```\n\nOriginal issue reported on code.google.com by `kenny.tr...@workiva.com` on 22 Dec 2014 at 7:08\n\nAttachments:\n* [test.py](https://storage.googleapis.com/google-code-attachments/mock/issue-242/comment-0/test.py)\n"}}