{"action":"created","issue":{"url":"https://api.github.com/repos/pythonindia/junction/issues/219","labels_url":"https://api.github.com/repos/pythonindia/junction/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/pythonindia/junction/issues/219/comments","events_url":"https://api.github.com/repos/pythonindia/junction/issues/219/events","html_url":"https://github.com/pythonindia/junction/issues/219","id":71297679,"number":219,"title":"write unit tests","user":{"login":"ChillarAnand","id":4463796,"avatar_url":"https://avatars.githubusercontent.com/u/4463796?v=3","gravatar_id":"","url":"https://api.github.com/users/ChillarAnand","html_url":"https://github.com/ChillarAnand","followers_url":"https://api.github.com/users/ChillarAnand/followers","following_url":"https://api.github.com/users/ChillarAnand/following{/other_user}","gists_url":"https://api.github.com/users/ChillarAnand/gists{/gist_id}","starred_url":"https://api.github.com/users/ChillarAnand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChillarAnand/subscriptions","organizations_url":"https://api.github.com/users/ChillarAnand/orgs","repos_url":"https://api.github.com/users/ChillarAnand/repos","events_url":"https://api.github.com/users/ChillarAnand/events{/privacy}","received_events_url":"https://api.github.com/users/ChillarAnand/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pythonindia/junction/labels/Enhancement","name":"Enhancement","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-04-27T14:20:28Z","updated_at":"2015-07-13T03:26:52Z","closed_at":null,"body":"we need to write unit tests!"},"comment":{"url":"https://api.github.com/repos/pythonindia/junction/issues/comments/120797137","html_url":"https://github.com/pythonindia/junction/issues/219#issuecomment-120797137","issue_url":"https://api.github.com/repos/pythonindia/junction/issues/219","id":120797137,"user":{"login":"theskumar","id":236356,"avatar_url":"https://avatars.githubusercontent.com/u/236356?v=3","gravatar_id":"","url":"https://api.github.com/users/theskumar","html_url":"https://github.com/theskumar","followers_url":"https://api.github.com/users/theskumar/followers","following_url":"https://api.github.com/users/theskumar/following{/other_user}","gists_url":"https://api.github.com/users/theskumar/gists{/gist_id}","starred_url":"https://api.github.com/users/theskumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theskumar/subscriptions","organizations_url":"https://api.github.com/users/theskumar/orgs","repos_url":"https://api.github.com/users/theskumar/repos","events_url":"https://api.github.com/users/theskumar/events{/privacy}","received_events_url":"https://api.github.com/users/theskumar/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T03:26:52Z","updated_at":"2015-07-13T03:26:52Z","body":"You don't need to mock email functionality, checkout `outbox` module[1]. \r\n\r\nWith pytest, you can also use available `outbox` fixture[2], while in development django is set to use `consoleBackend` so not actual email sent out anyways. \r\n\r\nSample Test:\r\n```\r\ndef test_some_function(outbox):\r\n  some_function()\r\n  assert len(outbox) == 1\r\n  assert \"sometext\" in outbox\r\n```\r\n\r\n__Footnotes__:\r\n\r\n[1] https://docs.djangoproject.com/en/1.8/topics/testing/tools/#email-services\r\n[2] https://github.com/pythonindia/junction/blob/master/tests/fixtures.py#L49-L53\r\n"}}