{"action":"created","comment":{"url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/comments/28865876","id":28865876,"diff_hunk":"@@ -1803,9 +1813,7 @@ def test_send(self):\n         # our outgoing sms\n         sms = bcast.get_messages()[0]\n \n-        try:\n-            settings.SEND_MESSAGES = True\n-\n+        with self.allow_message_sending():","path":"temba/api/tests.py","position":83,"original_position":83,"commit_id":"0b8eb723ea6412ad2e4eb6a1d9efe1321488dbc2","original_commit_id":"0b8eb723ea6412ad2e4eb6a1d9efe1321488dbc2","user":{"login":"nicpottier","id":168067,"avatar_url":"https://avatars.githubusercontent.com/u/168067?v=3","gravatar_id":"","url":"https://api.github.com/users/nicpottier","html_url":"https://github.com/nicpottier","followers_url":"https://api.github.com/users/nicpottier/followers","following_url":"https://api.github.com/users/nicpottier/following{/other_user}","gists_url":"https://api.github.com/users/nicpottier/gists{/gist_id}","starred_url":"https://api.github.com/users/nicpottier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicpottier/subscriptions","organizations_url":"https://api.github.com/users/nicpottier/orgs","repos_url":"https://api.github.com/users/nicpottier/repos","events_url":"https://api.github.com/users/nicpottier/events{/privacy}","received_events_url":"https://api.github.com/users/nicpottier/received_events","type":"User","site_admin":false},"body":"Nice, much cleaner.","created_at":"2015-04-22T12:08:10Z","updated_at":"2015-04-22T12:08:10Z","html_url":"https://github.com/rapidpro/rapidpro/pull/165#discussion_r28865876","pull_request_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/165","_links":{"self":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/comments/28865876"},"html":{"href":"https://github.com/rapidpro/rapidpro/pull/165#discussion_r28865876"},"pull_request":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/165"}}},"pull_request":{"url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/165","id":33772471,"html_url":"https://github.com/rapidpro/rapidpro/pull/165","diff_url":"https://github.com/rapidpro/rapidpro/pull/165.diff","patch_url":"https://github.com/rapidpro/rapidpro/pull/165.patch","issue_url":"https://api.github.com/repos/rapidpro/rapidpro/issues/165","number":165,"state":"open","locked":false,"title":"Split api send tests","user":{"login":"jerith","id":43731,"avatar_url":"https://avatars.githubusercontent.com/u/43731?v=3","gravatar_id":"","url":"https://api.github.com/users/jerith","html_url":"https://github.com/jerith","followers_url":"https://api.github.com/users/jerith/followers","following_url":"https://api.github.com/users/jerith/following{/other_user}","gists_url":"https://api.github.com/users/jerith/gists{/gist_id}","starred_url":"https://api.github.com/users/jerith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerith/subscriptions","organizations_url":"https://api.github.com/users/jerith/orgs","repos_url":"https://api.github.com/users/jerith/repos","events_url":"https://api.github.com/users/jerith/events{/privacy}","received_events_url":"https://api.github.com/users/jerith/received_events","type":"User","site_admin":false},"body":"Almost all of the `test_send` methods in the `api.test` module currently fail due to duplicate send prevention. This branch splits each of those tests into two methods (one for success, one for failure) to avoid sending the same message multiple times and to keep the message state for the two cases separate.","created_at":"2015-04-21T15:23:35Z","updated_at":"2015-04-22T12:08:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4bf9e616736e82854c20f9f590c49c3fa4ba1666","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/165/commits","review_comments_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/165/comments","review_comment_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rapidpro/rapidpro/issues/165/comments","statuses_url":"https://api.github.com/repos/rapidpro/rapidpro/statuses/0b8eb723ea6412ad2e4eb6a1d9efe1321488dbc2","head":{"label":"praekelt:split-api-send-tests","ref":"split-api-send-tests","sha":"0b8eb723ea6412ad2e4eb6a1d9efe1321488dbc2","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":34060727,"name":"rapidpro","full_name":"praekelt/rapidpro","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/rapidpro","description":"RapidPro allows organizations to visually build scalable interactive messaging applications.","fork":true,"url":"https://api.github.com/repos/praekelt/rapidpro","forks_url":"https://api.github.com/repos/praekelt/rapidpro/forks","keys_url":"https://api.github.com/repos/praekelt/rapidpro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/rapidpro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/rapidpro/teams","hooks_url":"https://api.github.com/repos/praekelt/rapidpro/hooks","issue_events_url":"https://api.github.com/repos/praekelt/rapidpro/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/rapidpro/events","assignees_url":"https://api.github.com/repos/praekelt/rapidpro/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/rapidpro/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/rapidpro/tags","blobs_url":"https://api.github.com/repos/praekelt/rapidpro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/rapidpro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/rapidpro/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/rapidpro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/rapidpro/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/rapidpro/languages","stargazers_url":"https://api.github.com/repos/praekelt/rapidpro/stargazers","contributors_url":"https://api.github.com/repos/praekelt/rapidpro/contributors","subscribers_url":"https://api.github.com/repos/praekelt/rapidpro/subscribers","subscription_url":"https://api.github.com/repos/praekelt/rapidpro/subscription","commits_url":"https://api.github.com/repos/praekelt/rapidpro/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/rapidpro/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/rapidpro/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/rapidpro/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/rapidpro/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/rapidpro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/rapidpro/merges","archive_url":"https://api.github.com/repos/praekelt/rapidpro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/rapidpro/downloads","issues_url":"https://api.github.com/repos/praekelt/rapidpro/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/rapidpro/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/rapidpro/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/rapidpro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/rapidpro/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/rapidpro/releases{/id}","created_at":"2015-04-16T14:30:32Z","updated_at":"2015-04-22T10:59:17Z","pushed_at":"2015-04-22T11:02:45Z","git_url":"git://github.com/praekelt/rapidpro.git","ssh_url":"git@github.com:praekelt/rapidpro.git","clone_url":"https://github.com/praekelt/rapidpro.git","svn_url":"https://github.com/praekelt/rapidpro","homepage":"","size":10356,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"develop"}},"base":{"label":"rapidpro:master","ref":"master","sha":"ffb726f7c23792b3b3a3ad60a5d4b36b893d5f6f","user":{"login":"rapidpro","id":7733752,"avatar_url":"https://avatars.githubusercontent.com/u/7733752?v=3","gravatar_id":"","url":"https://api.github.com/users/rapidpro","html_url":"https://github.com/rapidpro","followers_url":"https://api.github.com/users/rapidpro/followers","following_url":"https://api.github.com/users/rapidpro/following{/other_user}","gists_url":"https://api.github.com/users/rapidpro/gists{/gist_id}","starred_url":"https://api.github.com/users/rapidpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapidpro/subscriptions","organizations_url":"https://api.github.com/users/rapidpro/orgs","repos_url":"https://api.github.com/users/rapidpro/repos","events_url":"https://api.github.com/users/rapidpro/events{/privacy}","received_events_url":"https://api.github.com/users/rapidpro/received_events","type":"Organization","site_admin":false},"repo":{"id":27091452,"name":"rapidpro","full_name":"rapidpro/rapidpro","owner":{"login":"rapidpro","id":7733752,"avatar_url":"https://avatars.githubusercontent.com/u/7733752?v=3","gravatar_id":"","url":"https://api.github.com/users/rapidpro","html_url":"https://github.com/rapidpro","followers_url":"https://api.github.com/users/rapidpro/followers","following_url":"https://api.github.com/users/rapidpro/following{/other_user}","gists_url":"https://api.github.com/users/rapidpro/gists{/gist_id}","starred_url":"https://api.github.com/users/rapidpro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rapidpro/subscriptions","organizations_url":"https://api.github.com/users/rapidpro/orgs","repos_url":"https://api.github.com/users/rapidpro/repos","events_url":"https://api.github.com/users/rapidpro/events{/privacy}","received_events_url":"https://api.github.com/users/rapidpro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rapidpro/rapidpro","description":"RapidPro allows organizations to visually build scalable interactive messaging applications.","fork":false,"url":"https://api.github.com/repos/rapidpro/rapidpro","forks_url":"https://api.github.com/repos/rapidpro/rapidpro/forks","keys_url":"https://api.github.com/repos/rapidpro/rapidpro/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rapidpro/rapidpro/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rapidpro/rapidpro/teams","hooks_url":"https://api.github.com/repos/rapidpro/rapidpro/hooks","issue_events_url":"https://api.github.com/repos/rapidpro/rapidpro/issues/events{/number}","events_url":"https://api.github.com/repos/rapidpro/rapidpro/events","assignees_url":"https://api.github.com/repos/rapidpro/rapidpro/assignees{/user}","branches_url":"https://api.github.com/repos/rapidpro/rapidpro/branches{/branch}","tags_url":"https://api.github.com/repos/rapidpro/rapidpro/tags","blobs_url":"https://api.github.com/repos/rapidpro/rapidpro/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rapidpro/rapidpro/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rapidpro/rapidpro/git/refs{/sha}","trees_url":"https://api.github.com/repos/rapidpro/rapidpro/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rapidpro/rapidpro/statuses/{sha}","languages_url":"https://api.github.com/repos/rapidpro/rapidpro/languages","stargazers_url":"https://api.github.com/repos/rapidpro/rapidpro/stargazers","contributors_url":"https://api.github.com/repos/rapidpro/rapidpro/contributors","subscribers_url":"https://api.github.com/repos/rapidpro/rapidpro/subscribers","subscription_url":"https://api.github.com/repos/rapidpro/rapidpro/subscription","commits_url":"https://api.github.com/repos/rapidpro/rapidpro/commits{/sha}","git_commits_url":"https://api.github.com/repos/rapidpro/rapidpro/git/commits{/sha}","comments_url":"https://api.github.com/repos/rapidpro/rapidpro/comments{/number}","issue_comment_url":"https://api.github.com/repos/rapidpro/rapidpro/issues/comments{/number}","contents_url":"https://api.github.com/repos/rapidpro/rapidpro/contents/{+path}","compare_url":"https://api.github.com/repos/rapidpro/rapidpro/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rapidpro/rapidpro/merges","archive_url":"https://api.github.com/repos/rapidpro/rapidpro/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rapidpro/rapidpro/downloads","issues_url":"https://api.github.com/repos/rapidpro/rapidpro/issues{/number}","pulls_url":"https://api.github.com/repos/rapidpro/rapidpro/pulls{/number}","milestones_url":"https://api.github.com/repos/rapidpro/rapidpro/milestones{/number}","notifications_url":"https://api.github.com/repos/rapidpro/rapidpro/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rapidpro/rapidpro/labels{/name}","releases_url":"https://api.github.com/repos/rapidpro/rapidpro/releases{/id}","created_at":"2014-11-24T19:32:48Z","updated_at":"2015-04-21T12:21:02Z","pushed_at":"2015-04-22T10:59:40Z","git_url":"git://github.com/rapidpro/rapidpro.git","ssh_url":"git@github.com:rapidpro/rapidpro.git","clone_url":"https://github.com/rapidpro/rapidpro.git","svn_url":"https://github.com/rapidpro/rapidpro","homepage":"","size":11128,"stargazers_count":226,"watchers_count":226,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":52,"mirror_url":null,"open_issues_count":92,"forks":52,"open_issues":92,"watchers":226,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/165"},"html":{"href":"https://github.com/rapidpro/rapidpro/pull/165"},"issue":{"href":"https://api.github.com/repos/rapidpro/rapidpro/issues/165"},"comments":{"href":"https://api.github.com/repos/rapidpro/rapidpro/issues/165/comments"},"review_comments":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/165/comments"},"review_comment":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rapidpro/rapidpro/pulls/165/commits"},"statuses":{"href":"https://api.github.com/repos/rapidpro/rapidpro/statuses/0b8eb723ea6412ad2e4eb6a1d9efe1321488dbc2"}}}}