{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/airmozilla/pulls/comments/23553981","id":23553981,"diff_hunk":"@@ -0,0 +1,67 @@\n+from nose.tools import eq_, ok_\n+\n+from funfactory.urlresolvers import reverse\n+\n+from airmozilla.main.models import (\n+    Region,\n+)\n+from .base import ManageTestCase\n+\n+\n+class TestRegions(ManageTestCase):\n+    def test_regions(self):\n+        \"\"\"Region management pages return successfully.\"\"\"\n+        response = self.client.get(reverse('manage:regions'))\n+        eq_(response.status_code, 200)\n+\n+        region = Region.objects.create(name='New Region')\n+        response = self.client.get(reverse('manage:regions'))\n+        eq_(response.status_code, 200)\n+        eq_(region.name, 'New Region')\n+\n+    def test_region_new(self):\n+        \"\"\"Adding new region works correctly.\"\"\"\n+        url = reverse('manage:region_new')\n+        response = self.client.get(url)\n+        eq_(response.status_code, 200)\n+\n+        response_ok = self.client.post(url, {\n+            'name': 'testing',\n+        })\n+        self.assertRedirects(response_ok, reverse('manage:regions'))\n+        region = Region.objects.get(name='testing')\n+        response_fail = self.client.post(url)\n+        eq_(response_fail.status_code, 200)\n+        eq_(region.name, 'testing')","path":"airmozilla/manage/tests/views/test_regions.py","position":35,"original_position":35,"commit_id":"9d2d6130b83ec99cccb7c74bc9d434566fd4f409","original_commit_id":"9d2d6130b83ec99cccb7c74bc9d434566fd4f409","user":{"login":"peterbe","id":26739,"avatar_url":"https://avatars.githubusercontent.com/u/26739?v=3","gravatar_id":"","url":"https://api.github.com/users/peterbe","html_url":"https://github.com/peterbe","followers_url":"https://api.github.com/users/peterbe/followers","following_url":"https://api.github.com/users/peterbe/following{/other_user}","gists_url":"https://api.github.com/users/peterbe/gists{/gist_id}","starred_url":"https://api.github.com/users/peterbe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterbe/subscriptions","organizations_url":"https://api.github.com/users/peterbe/orgs","repos_url":"https://api.github.com/users/peterbe/repos","events_url":"https://api.github.com/users/peterbe/events{/privacy}","received_events_url":"https://api.github.com/users/peterbe/received_events","type":"User","site_admin":false},"body":"this line is not necessary. ","created_at":"2015-01-26T18:51:30Z","updated_at":"2015-01-26T18:51:30Z","html_url":"https://github.com/mozilla/airmozilla/pull/180#discussion_r23553981","pull_request_url":"https://api.github.com/repos/mozilla/airmozilla/pulls/180","_links":{"self":{"href":"https://api.github.com/repos/mozilla/airmozilla/pulls/comments/23553981"},"html":{"href":"https://github.com/mozilla/airmozilla/pull/180#discussion_r23553981"},"pull_request":{"href":"https://api.github.com/repos/mozilla/airmozilla/pulls/180"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/airmozilla/pulls/180","id":27806965,"html_url":"https://github.com/mozilla/airmozilla/pull/180","diff_url":"https://github.com/mozilla/airmozilla/pull/180.diff","patch_url":"https://github.com/mozilla/airmozilla/pull/180.patch","issue_url":"https://api.github.com/repos/mozilla/airmozilla/issues/180","number":180,"state":"open","locked":false,"title":"Bug 1097967 - Add Regions Table to DB","user":{"login":"bugzPDX","id":5467031,"avatar_url":"https://avatars.githubusercontent.com/u/5467031?v=3","gravatar_id":"","url":"https://api.github.com/users/bugzPDX","html_url":"https://github.com/bugzPDX","followers_url":"https://api.github.com/users/bugzPDX/followers","following_url":"https://api.github.com/users/bugzPDX/following{/other_user}","gists_url":"https://api.github.com/users/bugzPDX/gists{/gist_id}","starred_url":"https://api.github.com/users/bugzPDX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugzPDX/subscriptions","organizations_url":"https://api.github.com/users/bugzPDX/orgs","repos_url":"https://api.github.com/users/bugzPDX/repos","events_url":"https://api.github.com/users/bugzPDX/events{/privacy}","received_events_url":"https://api.github.com/users/bugzPDX/received_events","type":"User","site_admin":false},"body":"Replacing with a fresh copy to fix runserver errors\r\n\r\nBug 1097967 - Updates for review - Add Regions Table\r\n\r\nBug 1097967 - Add migration for Add Regions Table\r\n\r\nBug 1097967 - Edits to region_edit.html\r\n\r\nTicket 1097967 - Updates for Add Region Table to DB\r\n\r\nRemoving deprecated vendor-local directory","created_at":"2015-01-22T00:00:56Z","updated_at":"2015-01-26T18:51:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5ca94e5018e10449b834c6fd2578b615a2086dbb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/airmozilla/pulls/180/commits","review_comments_url":"https://api.github.com/repos/mozilla/airmozilla/pulls/180/comments","review_comment_url":"https://api.github.com/repos/mozilla/airmozilla/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/airmozilla/issues/180/comments","statuses_url":"https://api.github.com/repos/mozilla/airmozilla/statuses/9d2d6130b83ec99cccb7c74bc9d434566fd4f409","head":{"label":"bugzPDX:1097967","ref":"1097967","sha":"9d2d6130b83ec99cccb7c74bc9d434566fd4f409","user":{"login":"bugzPDX","id":5467031,"avatar_url":"https://avatars.githubusercontent.com/u/5467031?v=3","gravatar_id":"","url":"https://api.github.com/users/bugzPDX","html_url":"https://github.com/bugzPDX","followers_url":"https://api.github.com/users/bugzPDX/followers","following_url":"https://api.github.com/users/bugzPDX/following{/other_user}","gists_url":"https://api.github.com/users/bugzPDX/gists{/gist_id}","starred_url":"https://api.github.com/users/bugzPDX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugzPDX/subscriptions","organizations_url":"https://api.github.com/users/bugzPDX/orgs","repos_url":"https://api.github.com/users/bugzPDX/repos","events_url":"https://api.github.com/users/bugzPDX/events{/privacy}","received_events_url":"https://api.github.com/users/bugzPDX/received_events","type":"User","site_admin":false},"repo":{"id":25278058,"name":"airmozilla","full_name":"bugzPDX/airmozilla","owner":{"login":"bugzPDX","id":5467031,"avatar_url":"https://avatars.githubusercontent.com/u/5467031?v=3","gravatar_id":"","url":"https://api.github.com/users/bugzPDX","html_url":"https://github.com/bugzPDX","followers_url":"https://api.github.com/users/bugzPDX/followers","following_url":"https://api.github.com/users/bugzPDX/following{/other_user}","gists_url":"https://api.github.com/users/bugzPDX/gists{/gist_id}","starred_url":"https://api.github.com/users/bugzPDX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugzPDX/subscriptions","organizations_url":"https://api.github.com/users/bugzPDX/orgs","repos_url":"https://api.github.com/users/bugzPDX/repos","events_url":"https://api.github.com/users/bugzPDX/events{/privacy}","received_events_url":"https://api.github.com/users/bugzPDX/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bugzPDX/airmozilla","description":"AirMozilla is a the video broadcasting site for the Mozilla project","fork":true,"url":"https://api.github.com/repos/bugzPDX/airmozilla","forks_url":"https://api.github.com/repos/bugzPDX/airmozilla/forks","keys_url":"https://api.github.com/repos/bugzPDX/airmozilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugzPDX/airmozilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugzPDX/airmozilla/teams","hooks_url":"https://api.github.com/repos/bugzPDX/airmozilla/hooks","issue_events_url":"https://api.github.com/repos/bugzPDX/airmozilla/issues/events{/number}","events_url":"https://api.github.com/repos/bugzPDX/airmozilla/events","assignees_url":"https://api.github.com/repos/bugzPDX/airmozilla/assignees{/user}","branches_url":"https://api.github.com/repos/bugzPDX/airmozilla/branches{/branch}","tags_url":"https://api.github.com/repos/bugzPDX/airmozilla/tags","blobs_url":"https://api.github.com/repos/bugzPDX/airmozilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugzPDX/airmozilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugzPDX/airmozilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugzPDX/airmozilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugzPDX/airmozilla/statuses/{sha}","languages_url":"https://api.github.com/repos/bugzPDX/airmozilla/languages","stargazers_url":"https://api.github.com/repos/bugzPDX/airmozilla/stargazers","contributors_url":"https://api.github.com/repos/bugzPDX/airmozilla/contributors","subscribers_url":"https://api.github.com/repos/bugzPDX/airmozilla/subscribers","subscription_url":"https://api.github.com/repos/bugzPDX/airmozilla/subscription","commits_url":"https://api.github.com/repos/bugzPDX/airmozilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugzPDX/airmozilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugzPDX/airmozilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugzPDX/airmozilla/issues/comments/{number}","contents_url":"https://api.github.com/repos/bugzPDX/airmozilla/contents/{+path}","compare_url":"https://api.github.com/repos/bugzPDX/airmozilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugzPDX/airmozilla/merges","archive_url":"https://api.github.com/repos/bugzPDX/airmozilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugzPDX/airmozilla/downloads","issues_url":"https://api.github.com/repos/bugzPDX/airmozilla/issues{/number}","pulls_url":"https://api.github.com/repos/bugzPDX/airmozilla/pulls{/number}","milestones_url":"https://api.github.com/repos/bugzPDX/airmozilla/milestones{/number}","notifications_url":"https://api.github.com/repos/bugzPDX/airmozilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugzPDX/airmozilla/labels{/name}","releases_url":"https://api.github.com/repos/bugzPDX/airmozilla/releases{/id}","created_at":"2014-10-15T23:33:18Z","updated_at":"2014-10-13T22:25:40Z","pushed_at":"2015-01-26T18:20:57Z","git_url":"git://github.com/bugzPDX/airmozilla.git","ssh_url":"git@github.com:bugzPDX/airmozilla.git","clone_url":"https://github.com/bugzPDX/airmozilla.git","svn_url":"https://github.com/bugzPDX/airmozilla","homepage":"https://air.mozilla.org","size":8589,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"6b6f4885a36b581166636adb925e0cf68bfa3153","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":4588705,"name":"airmozilla","full_name":"mozilla/airmozilla","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/airmozilla","description":"AirMozilla is a the video broadcasting site for the Mozilla project","fork":false,"url":"https://api.github.com/repos/mozilla/airmozilla","forks_url":"https://api.github.com/repos/mozilla/airmozilla/forks","keys_url":"https://api.github.com/repos/mozilla/airmozilla/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/airmozilla/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/airmozilla/teams","hooks_url":"https://api.github.com/repos/mozilla/airmozilla/hooks","issue_events_url":"https://api.github.com/repos/mozilla/airmozilla/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/airmozilla/events","assignees_url":"https://api.github.com/repos/mozilla/airmozilla/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/airmozilla/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/airmozilla/tags","blobs_url":"https://api.github.com/repos/mozilla/airmozilla/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/airmozilla/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/airmozilla/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/airmozilla/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/airmozilla/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/airmozilla/languages","stargazers_url":"https://api.github.com/repos/mozilla/airmozilla/stargazers","contributors_url":"https://api.github.com/repos/mozilla/airmozilla/contributors","subscribers_url":"https://api.github.com/repos/mozilla/airmozilla/subscribers","subscription_url":"https://api.github.com/repos/mozilla/airmozilla/subscription","commits_url":"https://api.github.com/repos/mozilla/airmozilla/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/airmozilla/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/airmozilla/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/airmozilla/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/airmozilla/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/airmozilla/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/airmozilla/merges","archive_url":"https://api.github.com/repos/mozilla/airmozilla/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/airmozilla/downloads","issues_url":"https://api.github.com/repos/mozilla/airmozilla/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/airmozilla/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/airmozilla/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/airmozilla/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/airmozilla/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/airmozilla/releases{/id}","created_at":"2012-06-07T18:19:43Z","updated_at":"2015-01-24T00:05:12Z","pushed_at":"2015-01-24T00:05:12Z","git_url":"git://github.com/mozilla/airmozilla.git","ssh_url":"git@github.com:mozilla/airmozilla.git","clone_url":"https://github.com/mozilla/airmozilla.git","svn_url":"https://github.com/mozilla/airmozilla","homepage":"https://air.mozilla.org","size":11944,"stargazers_count":41,"watchers_count":41,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":10,"forks":31,"open_issues":10,"watchers":41,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/airmozilla/pulls/180"},"html":{"href":"https://github.com/mozilla/airmozilla/pull/180"},"issue":{"href":"https://api.github.com/repos/mozilla/airmozilla/issues/180"},"comments":{"href":"https://api.github.com/repos/mozilla/airmozilla/issues/180/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/airmozilla/pulls/180/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/airmozilla/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/airmozilla/pulls/180/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/airmozilla/statuses/9d2d6130b83ec99cccb7c74bc9d434566fd4f409"}}}}