{"action":"created","comment":{"url":"https://api.github.com/repos/electology/approval_frame/pulls/comments/32756243","id":32756243,"diff_hunk":"@@ -161,6 +161,36 @@ def test_vote_view_counts_increase(self):\n         self.assertContains(response, '21 votes')\n         self.assertContains(response, '101 ballots', status_code=200)\n \n+class MyPollTestsWithoutLoggedIn(TestCase):\n+    def setUp(self):\n+        self.client = Client()\n+        user = User.objects.create_user('test','test@example.com','test')\n+\n+    def test_my_polls_without_logged_in(self):\n+        \"\"\"\n+        If user is not loggin in, it return a 302 found.\n+        \"\"\"\n+        response = self.client.get(reverse('approval_polls:my_polls'))\n+        self.assertEqual(response.status_code, 302)\n+\n+class MyPollTests(TestCase):\n+    def setUp(self):\n+        self.client = Client()\n+        create_poll(question=\"question1\", days=-5)\n+        create_poll(question=\"question2\", username=\"user2\", days=-5)\n+        self.client.login(username='user1', password='test')\n+\n+    def test_my_polls(self):\n+        \"\"\"\n+        Creating two polls by two users, only polls created by the logged in user will be displayed.\n+        \"\"\"\n+        response = self.client.get(reverse('approval_polls:my_polls'))\n+        self.assertEqual(response.status_code, 200)\n+        self.assertQuerysetEqual(\n+            response.context['latest_poll_list'],\n+            ['<Poll: question1>']\n+        )\n+","path":"approval_polls/tests.py","position":33,"original_position":33,"commit_id":"d5c8dd5dd961464ebca7a835b670563026dbfe72","original_commit_id":"d5c8dd5dd961464ebca7a835b670563026dbfe72","user":{"login":"Brianjr0428","id":4754126,"avatar_url":"https://avatars.githubusercontent.com/u/4754126?v=3","gravatar_id":"","url":"https://api.github.com/users/Brianjr0428","html_url":"https://github.com/Brianjr0428","followers_url":"https://api.github.com/users/Brianjr0428/followers","following_url":"https://api.github.com/users/Brianjr0428/following{/other_user}","gists_url":"https://api.github.com/users/Brianjr0428/gists{/gist_id}","starred_url":"https://api.github.com/users/Brianjr0428/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brianjr0428/subscriptions","organizations_url":"https://api.github.com/users/Brianjr0428/orgs","repos_url":"https://api.github.com/users/Brianjr0428/repos","events_url":"https://api.github.com/users/Brianjr0428/events{/privacy}","received_events_url":"https://api.github.com/users/Brianjr0428/received_events","type":"User","site_admin":false},"body":"@ashimaathri \r\nI've thought about it but I got a dilemma. If the user is logged in, it's not possible to test the redirect when user is not logged in, and vice versa.\r\nPerhaps there is an optimal solution but I did not figure it out.\r\nLet me know if you have other idea.\r\nThanks!","created_at":"2015-06-18T17:37:23Z","updated_at":"2015-06-18T17:37:23Z","html_url":"https://github.com/electology/approval_frame/pull/58#discussion_r32756243","pull_request_url":"https://api.github.com/repos/electology/approval_frame/pulls/58","_links":{"self":{"href":"https://api.github.com/repos/electology/approval_frame/pulls/comments/32756243"},"html":{"href":"https://github.com/electology/approval_frame/pull/58#discussion_r32756243"},"pull_request":{"href":"https://api.github.com/repos/electology/approval_frame/pulls/58"}}},"pull_request":{"url":"https://api.github.com/repos/electology/approval_frame/pulls/58","id":37299870,"html_url":"https://github.com/electology/approval_frame/pull/58","diff_url":"https://github.com/electology/approval_frame/pull/58.diff","patch_url":"https://github.com/electology/approval_frame/pull/58.patch","issue_url":"https://api.github.com/repos/electology/approval_frame/issues/58","number":58,"state":"open","locked":false,"title":"Issue14","user":{"login":"Brianjr0428","id":4754126,"avatar_url":"https://avatars.githubusercontent.com/u/4754126?v=3","gravatar_id":"","url":"https://api.github.com/users/Brianjr0428","html_url":"https://github.com/Brianjr0428","followers_url":"https://api.github.com/users/Brianjr0428/followers","following_url":"https://api.github.com/users/Brianjr0428/following{/other_user}","gists_url":"https://api.github.com/users/Brianjr0428/gists{/gist_id}","starred_url":"https://api.github.com/users/Brianjr0428/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brianjr0428/subscriptions","organizations_url":"https://api.github.com/users/Brianjr0428/orgs","repos_url":"https://api.github.com/users/Brianjr0428/repos","events_url":"https://api.github.com/users/Brianjr0428/events{/privacy}","received_events_url":"https://api.github.com/users/Brianjr0428/received_events","type":"User","site_admin":false},"body":"Chages here:\r\n\r\n- Created a template for reviewing personal polls.\r\n- Added 'Manage your polls' options for each user\r\n- Add new url and new def for reviewing polls. ","created_at":"2015-06-09T21:06:31Z","updated_at":"2015-06-18T17:37:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5cfffc1139ce6dae954e3bcf5fa37c0dc533babf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/electology/approval_frame/pulls/58/commits","review_comments_url":"https://api.github.com/repos/electology/approval_frame/pulls/58/comments","review_comment_url":"https://api.github.com/repos/electology/approval_frame/pulls/comments{/number}","comments_url":"https://api.github.com/repos/electology/approval_frame/issues/58/comments","statuses_url":"https://api.github.com/repos/electology/approval_frame/statuses/d5c8dd5dd961464ebca7a835b670563026dbfe72","head":{"label":"Brianjr0428:issue14","ref":"issue14","sha":"d5c8dd5dd961464ebca7a835b670563026dbfe72","user":{"login":"Brianjr0428","id":4754126,"avatar_url":"https://avatars.githubusercontent.com/u/4754126?v=3","gravatar_id":"","url":"https://api.github.com/users/Brianjr0428","html_url":"https://github.com/Brianjr0428","followers_url":"https://api.github.com/users/Brianjr0428/followers","following_url":"https://api.github.com/users/Brianjr0428/following{/other_user}","gists_url":"https://api.github.com/users/Brianjr0428/gists{/gist_id}","starred_url":"https://api.github.com/users/Brianjr0428/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brianjr0428/subscriptions","organizations_url":"https://api.github.com/users/Brianjr0428/orgs","repos_url":"https://api.github.com/users/Brianjr0428/repos","events_url":"https://api.github.com/users/Brianjr0428/events{/privacy}","received_events_url":"https://api.github.com/users/Brianjr0428/received_events","type":"User","site_admin":false},"repo":{"id":35845279,"name":"approval_frame","full_name":"Brianjr0428/approval_frame","owner":{"login":"Brianjr0428","id":4754126,"avatar_url":"https://avatars.githubusercontent.com/u/4754126?v=3","gravatar_id":"","url":"https://api.github.com/users/Brianjr0428","html_url":"https://github.com/Brianjr0428","followers_url":"https://api.github.com/users/Brianjr0428/followers","following_url":"https://api.github.com/users/Brianjr0428/following{/other_user}","gists_url":"https://api.github.com/users/Brianjr0428/gists{/gist_id}","starred_url":"https://api.github.com/users/Brianjr0428/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brianjr0428/subscriptions","organizations_url":"https://api.github.com/users/Brianjr0428/orgs","repos_url":"https://api.github.com/users/Brianjr0428/repos","events_url":"https://api.github.com/users/Brianjr0428/events{/privacy}","received_events_url":"https://api.github.com/users/Brianjr0428/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Brianjr0428/approval_frame","description":"Down with Plurality-Based Web Polling!","fork":true,"url":"https://api.github.com/repos/Brianjr0428/approval_frame","forks_url":"https://api.github.com/repos/Brianjr0428/approval_frame/forks","keys_url":"https://api.github.com/repos/Brianjr0428/approval_frame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Brianjr0428/approval_frame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Brianjr0428/approval_frame/teams","hooks_url":"https://api.github.com/repos/Brianjr0428/approval_frame/hooks","issue_events_url":"https://api.github.com/repos/Brianjr0428/approval_frame/issues/events{/number}","events_url":"https://api.github.com/repos/Brianjr0428/approval_frame/events","assignees_url":"https://api.github.com/repos/Brianjr0428/approval_frame/assignees{/user}","branches_url":"https://api.github.com/repos/Brianjr0428/approval_frame/branches{/branch}","tags_url":"https://api.github.com/repos/Brianjr0428/approval_frame/tags","blobs_url":"https://api.github.com/repos/Brianjr0428/approval_frame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Brianjr0428/approval_frame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Brianjr0428/approval_frame/git/refs{/sha}","trees_url":"https://api.github.com/repos/Brianjr0428/approval_frame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Brianjr0428/approval_frame/statuses/{sha}","languages_url":"https://api.github.com/repos/Brianjr0428/approval_frame/languages","stargazers_url":"https://api.github.com/repos/Brianjr0428/approval_frame/stargazers","contributors_url":"https://api.github.com/repos/Brianjr0428/approval_frame/contributors","subscribers_url":"https://api.github.com/repos/Brianjr0428/approval_frame/subscribers","subscription_url":"https://api.github.com/repos/Brianjr0428/approval_frame/subscription","commits_url":"https://api.github.com/repos/Brianjr0428/approval_frame/commits{/sha}","git_commits_url":"https://api.github.com/repos/Brianjr0428/approval_frame/git/commits{/sha}","comments_url":"https://api.github.com/repos/Brianjr0428/approval_frame/comments{/number}","issue_comment_url":"https://api.github.com/repos/Brianjr0428/approval_frame/issues/comments{/number}","contents_url":"https://api.github.com/repos/Brianjr0428/approval_frame/contents/{+path}","compare_url":"https://api.github.com/repos/Brianjr0428/approval_frame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Brianjr0428/approval_frame/merges","archive_url":"https://api.github.com/repos/Brianjr0428/approval_frame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Brianjr0428/approval_frame/downloads","issues_url":"https://api.github.com/repos/Brianjr0428/approval_frame/issues{/number}","pulls_url":"https://api.github.com/repos/Brianjr0428/approval_frame/pulls{/number}","milestones_url":"https://api.github.com/repos/Brianjr0428/approval_frame/milestones{/number}","notifications_url":"https://api.github.com/repos/Brianjr0428/approval_frame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Brianjr0428/approval_frame/labels{/name}","releases_url":"https://api.github.com/repos/Brianjr0428/approval_frame/releases{/id}","created_at":"2015-05-18T22:11:15Z","updated_at":"2015-05-18T22:11:15Z","pushed_at":"2015-06-16T18:32:42Z","git_url":"git://github.com/Brianjr0428/approval_frame.git","ssh_url":"git@github.com:Brianjr0428/approval_frame.git","clone_url":"https://github.com/Brianjr0428/approval_frame.git","svn_url":"https://github.com/Brianjr0428/approval_frame","homepage":null,"size":646,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"electology:master","ref":"master","sha":"cfab2b8830425a8b17e42cefb335602180de7b5b","user":{"login":"electology","id":1455193,"avatar_url":"https://avatars.githubusercontent.com/u/1455193?v=3","gravatar_id":"","url":"https://api.github.com/users/electology","html_url":"https://github.com/electology","followers_url":"https://api.github.com/users/electology/followers","following_url":"https://api.github.com/users/electology/following{/other_user}","gists_url":"https://api.github.com/users/electology/gists{/gist_id}","starred_url":"https://api.github.com/users/electology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electology/subscriptions","organizations_url":"https://api.github.com/users/electology/orgs","repos_url":"https://api.github.com/users/electology/repos","events_url":"https://api.github.com/users/electology/events{/privacy}","received_events_url":"https://api.github.com/users/electology/received_events","type":"Organization","site_admin":false},"repo":{"id":16266964,"name":"approval_frame","full_name":"electology/approval_frame","owner":{"login":"electology","id":1455193,"avatar_url":"https://avatars.githubusercontent.com/u/1455193?v=3","gravatar_id":"","url":"https://api.github.com/users/electology","html_url":"https://github.com/electology","followers_url":"https://api.github.com/users/electology/followers","following_url":"https://api.github.com/users/electology/following{/other_user}","gists_url":"https://api.github.com/users/electology/gists{/gist_id}","starred_url":"https://api.github.com/users/electology/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electology/subscriptions","organizations_url":"https://api.github.com/users/electology/orgs","repos_url":"https://api.github.com/users/electology/repos","events_url":"https://api.github.com/users/electology/events{/privacy}","received_events_url":"https://api.github.com/users/electology/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/electology/approval_frame","description":"Down with Plurality-Based Web Polling!","fork":false,"url":"https://api.github.com/repos/electology/approval_frame","forks_url":"https://api.github.com/repos/electology/approval_frame/forks","keys_url":"https://api.github.com/repos/electology/approval_frame/keys{/key_id}","collaborators_url":"https://api.github.com/repos/electology/approval_frame/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/electology/approval_frame/teams","hooks_url":"https://api.github.com/repos/electology/approval_frame/hooks","issue_events_url":"https://api.github.com/repos/electology/approval_frame/issues/events{/number}","events_url":"https://api.github.com/repos/electology/approval_frame/events","assignees_url":"https://api.github.com/repos/electology/approval_frame/assignees{/user}","branches_url":"https://api.github.com/repos/electology/approval_frame/branches{/branch}","tags_url":"https://api.github.com/repos/electology/approval_frame/tags","blobs_url":"https://api.github.com/repos/electology/approval_frame/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/electology/approval_frame/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/electology/approval_frame/git/refs{/sha}","trees_url":"https://api.github.com/repos/electology/approval_frame/git/trees{/sha}","statuses_url":"https://api.github.com/repos/electology/approval_frame/statuses/{sha}","languages_url":"https://api.github.com/repos/electology/approval_frame/languages","stargazers_url":"https://api.github.com/repos/electology/approval_frame/stargazers","contributors_url":"https://api.github.com/repos/electology/approval_frame/contributors","subscribers_url":"https://api.github.com/repos/electology/approval_frame/subscribers","subscription_url":"https://api.github.com/repos/electology/approval_frame/subscription","commits_url":"https://api.github.com/repos/electology/approval_frame/commits{/sha}","git_commits_url":"https://api.github.com/repos/electology/approval_frame/git/commits{/sha}","comments_url":"https://api.github.com/repos/electology/approval_frame/comments{/number}","issue_comment_url":"https://api.github.com/repos/electology/approval_frame/issues/comments{/number}","contents_url":"https://api.github.com/repos/electology/approval_frame/contents/{+path}","compare_url":"https://api.github.com/repos/electology/approval_frame/compare/{base}...{head}","merges_url":"https://api.github.com/repos/electology/approval_frame/merges","archive_url":"https://api.github.com/repos/electology/approval_frame/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/electology/approval_frame/downloads","issues_url":"https://api.github.com/repos/electology/approval_frame/issues{/number}","pulls_url":"https://api.github.com/repos/electology/approval_frame/pulls{/number}","milestones_url":"https://api.github.com/repos/electology/approval_frame/milestones{/number}","notifications_url":"https://api.github.com/repos/electology/approval_frame/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/electology/approval_frame/labels{/name}","releases_url":"https://api.github.com/repos/electology/approval_frame/releases{/id}","created_at":"2014-01-27T02:13:58Z","updated_at":"2015-05-12T18:42:56Z","pushed_at":"2015-06-18T10:30:38Z","git_url":"git://github.com/electology/approval_frame.git","ssh_url":"git@github.com:electology/approval_frame.git","clone_url":"https://github.com/electology/approval_frame.git","svn_url":"https://github.com/electology/approval_frame","homepage":null,"size":1105,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":15,"forks":17,"open_issues":15,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/electology/approval_frame/pulls/58"},"html":{"href":"https://github.com/electology/approval_frame/pull/58"},"issue":{"href":"https://api.github.com/repos/electology/approval_frame/issues/58"},"comments":{"href":"https://api.github.com/repos/electology/approval_frame/issues/58/comments"},"review_comments":{"href":"https://api.github.com/repos/electology/approval_frame/pulls/58/comments"},"review_comment":{"href":"https://api.github.com/repos/electology/approval_frame/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/electology/approval_frame/pulls/58/commits"},"statuses":{"href":"https://api.github.com/repos/electology/approval_frame/statuses/d5c8dd5dd961464ebca7a835b670563026dbfe72"}}}}