{"action":"created","comment":{"url":"https://api.github.com/repos/opencurrents/opencurrents/pulls/comments/124132976","pull_request_review_id":46396733,"id":124132976,"diff_hunk":"@@ -1,3 +1,94 @@\n from django.test import TestCase\n+from django.contrib.sessions.middleware import SessionMiddleware\n+\n+from django.contrib.auth.models import AnonymousUser, User\n+import unittest\n+from django.test import RequestFactory\n+from .views import ProfileView\n+from .views import event_checkin\n+from django.test import Client\n+\n+\n+######################################################################################\n+#Run this file in the manage.py directory as 'python manage.py test openCurrents.tests'\n+######################################################################################\n+\n+class LogInTest(TestCase):\n+    \"\"\"TestSuite for User Login\"\"\"\n+    def setUp(self):\n+        \"\"\"Setting up the user to test Login\"\"\"\n+        self.credentials = {\n+            'username': 'testuser',\n+            'password': 'secret'}\n+        self.user = User.objects.create_user(**self.credentials)\n+\n+    def test_login(self):\n+        \"\"\"TestCase for Login failure\"\"\"\n+        # send login data\n+        form_data = { 'user_email':'testuser','user_password':'secret' }\n+        response = self.client.post('/process_login/', form_data, follow=True)\n+        self.assertContains(response, \"Invalid login/password\", 1, 200)\n+\n+    def test_log_success(self):\n+        \"\"\"TestCase fore Login Success\"\"\"\n+        form_data = { 'user_email':'testuser','user_password':'secret' }\n+        response = self.client.post('/process_login/', form_data, follow=True)\n+        #print(response)\n+        self.assertContains(response, \"Welcome\", 1, 200)\n+    \n+    def tearDown(self):\n+        self.user.delete()\n+\n+class SignUpTest(TestCase):\n+    \"\"\"TestSuite for Signup\"\"\"\n+    def setUp(self):\n+        \"\"\"Setting up the user to test Signup\"\"\"\n+        self.credentials = {\n+            'username': 'testuser',\n+            'password': 'secret'}\n+        self.user = User.objects.create_user(**self.credentials)\n+    \n+    def test_signup(self):\n+        \"\"\"TestCase for successful Signup\"\"\"\n+        # send login data\n+        form_data = { 'user_email':'karthikbmk1993@gmail.com','user_firstname':'karthik','user_lastname':'manjunath' }\n+        response = self.client.post('/process_signup/', form_data, follow=True)\n+        self.assertEqual(response.status_code, 200)\n+    \n+    def test_signup_failure(self):\n+        \"\"\"TestCase for erroneous Signup\"\"\"\n+        form_data = { 'user_email':'karthikbmk1993','user_firstname':'karthik','user_lastname':'manjunath' }\n+        response = self.client.post('/process_signup/', form_data, follow=True)\n+        self.assertEqual(response.status_code, 200)\n+    \n+    def tearDown(self):\n+        self.user.delete()\n+\n+\n+class EventCheckinTest(TestCase):\n+    \"\"\"TestSuite for event checkin\"\"\"\n+    def setUp(self):\n+        \"\"\"Setting up the user to test event checkin\"\"\"\n+        self.factory = RequestFactory()\n+        self.credentials = {\n+            'username': 'testuser',\n+            'password': 'secret'}\n+        self.user = User.objects.create_user(**self.credentials)\n+\n+    def test_event_checkin(self):","path":"openCurrents/tests.py","position":78,"original_position":78,"commit_id":"32c5761ddc464bca76c2f4351461623293fdf920","original_commit_id":"32c5761ddc464bca76c2f4351461623293fdf920","user":{"login":"karbmk","id":8406712,"avatar_url":"https://avatars3.githubusercontent.com/u/8406712?v=3","gravatar_id":"","url":"https://api.github.com/users/karbmk","html_url":"https://github.com/karbmk","followers_url":"https://api.github.com/users/karbmk/followers","following_url":"https://api.github.com/users/karbmk/following{/other_user}","gists_url":"https://api.github.com/users/karbmk/gists{/gist_id}","starred_url":"https://api.github.com/users/karbmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karbmk/subscriptions","organizations_url":"https://api.github.com/users/karbmk/orgs","repos_url":"https://api.github.com/users/karbmk/repos","events_url":"https://api.github.com/users/karbmk/events{/privacy}","received_events_url":"https://api.github.com/users/karbmk/received_events","type":"User","site_admin":false},"body":"Hi, sorry for the late reply. I will take a look on it for sure","created_at":"2017-06-26T21:59:43Z","updated_at":"2017-06-26T21:59:44Z","html_url":"https://github.com/opencurrents/opencurrents/pull/100#discussion_r124132976","pull_request_url":"https://api.github.com/repos/opencurrents/opencurrents/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/opencurrents/opencurrents/pulls/comments/124132976"},"html":{"href":"https://github.com/opencurrents/opencurrents/pull/100#discussion_r124132976"},"pull_request":{"href":"https://api.github.com/repos/opencurrents/opencurrents/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/opencurrents/opencurrents/pulls/100","id":124965180,"html_url":"https://github.com/opencurrents/opencurrents/pull/100","diff_url":"https://github.com/opencurrents/opencurrents/pull/100.diff","patch_url":"https://github.com/opencurrents/opencurrents/pull/100.patch","issue_url":"https://api.github.com/repos/opencurrents/opencurrents/issues/100","number":100,"state":"open","locked":false,"title":"live-dashboard: Unit tests","user":{"login":"karbmk","id":8406712,"avatar_url":"https://avatars3.githubusercontent.com/u/8406712?v=3","gravatar_id":"","url":"https://api.github.com/users/karbmk","html_url":"https://github.com/karbmk","followers_url":"https://api.github.com/users/karbmk/followers","following_url":"https://api.github.com/users/karbmk/following{/other_user}","gists_url":"https://api.github.com/users/karbmk/gists{/gist_id}","starred_url":"https://api.github.com/users/karbmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karbmk/subscriptions","organizations_url":"https://api.github.com/users/karbmk/orgs","repos_url":"https://api.github.com/users/karbmk/repos","events_url":"https://api.github.com/users/karbmk/events{/privacy}","received_events_url":"https://api.github.com/users/karbmk/received_events","type":"User","site_admin":false},"body":"Test case for event checkin redirection to live-dashboard added.","created_at":"2017-06-09T23:10:31Z","updated_at":"2017-06-26T21:59:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99fc5a60dfafbebd2c482c1829c9a9d23d3fecdd","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/opencurrents/opencurrents/pulls/100/commits","review_comments_url":"https://api.github.com/repos/opencurrents/opencurrents/pulls/100/comments","review_comment_url":"https://api.github.com/repos/opencurrents/opencurrents/pulls/comments{/number}","comments_url":"https://api.github.com/repos/opencurrents/opencurrents/issues/100/comments","statuses_url":"https://api.github.com/repos/opencurrents/opencurrents/statuses/32c5761ddc464bca76c2f4351461623293fdf920","head":{"label":"opencurrents:karthik","ref":"karthik","sha":"32c5761ddc464bca76c2f4351461623293fdf920","user":{"login":"opencurrents","id":25483642,"avatar_url":"https://avatars3.githubusercontent.com/u/25483642?v=3","gravatar_id":"","url":"https://api.github.com/users/opencurrents","html_url":"https://github.com/opencurrents","followers_url":"https://api.github.com/users/opencurrents/followers","following_url":"https://api.github.com/users/opencurrents/following{/other_user}","gists_url":"https://api.github.com/users/opencurrents/gists{/gist_id}","starred_url":"https://api.github.com/users/opencurrents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencurrents/subscriptions","organizations_url":"https://api.github.com/users/opencurrents/orgs","repos_url":"https://api.github.com/users/opencurrents/repos","events_url":"https://api.github.com/users/opencurrents/events{/privacy}","received_events_url":"https://api.github.com/users/opencurrents/received_events","type":"Organization","site_admin":false},"repo":{"id":81169454,"name":"opencurrents","full_name":"opencurrents/opencurrents","owner":{"login":"opencurrents","id":25483642,"avatar_url":"https://avatars3.githubusercontent.com/u/25483642?v=3","gravatar_id":"","url":"https://api.github.com/users/opencurrents","html_url":"https://github.com/opencurrents","followers_url":"https://api.github.com/users/opencurrents/followers","following_url":"https://api.github.com/users/opencurrents/following{/other_user}","gists_url":"https://api.github.com/users/opencurrents/gists{/gist_id}","starred_url":"https://api.github.com/users/opencurrents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencurrents/subscriptions","organizations_url":"https://api.github.com/users/opencurrents/orgs","repos_url":"https://api.github.com/users/opencurrents/repos","events_url":"https://api.github.com/users/opencurrents/events{/privacy}","received_events_url":"https://api.github.com/users/opencurrents/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencurrents/opencurrents","description":null,"fork":false,"url":"https://api.github.com/repos/opencurrents/opencurrents","forks_url":"https://api.github.com/repos/opencurrents/opencurrents/forks","keys_url":"https://api.github.com/repos/opencurrents/opencurrents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencurrents/opencurrents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencurrents/opencurrents/teams","hooks_url":"https://api.github.com/repos/opencurrents/opencurrents/hooks","issue_events_url":"https://api.github.com/repos/opencurrents/opencurrents/issues/events{/number}","events_url":"https://api.github.com/repos/opencurrents/opencurrents/events","assignees_url":"https://api.github.com/repos/opencurrents/opencurrents/assignees{/user}","branches_url":"https://api.github.com/repos/opencurrents/opencurrents/branches{/branch}","tags_url":"https://api.github.com/repos/opencurrents/opencurrents/tags","blobs_url":"https://api.github.com/repos/opencurrents/opencurrents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencurrents/opencurrents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencurrents/opencurrents/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencurrents/opencurrents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencurrents/opencurrents/statuses/{sha}","languages_url":"https://api.github.com/repos/opencurrents/opencurrents/languages","stargazers_url":"https://api.github.com/repos/opencurrents/opencurrents/stargazers","contributors_url":"https://api.github.com/repos/opencurrents/opencurrents/contributors","subscribers_url":"https://api.github.com/repos/opencurrents/opencurrents/subscribers","subscription_url":"https://api.github.com/repos/opencurrents/opencurrents/subscription","commits_url":"https://api.github.com/repos/opencurrents/opencurrents/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencurrents/opencurrents/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencurrents/opencurrents/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencurrents/opencurrents/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencurrents/opencurrents/contents/{+path}","compare_url":"https://api.github.com/repos/opencurrents/opencurrents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencurrents/opencurrents/merges","archive_url":"https://api.github.com/repos/opencurrents/opencurrents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencurrents/opencurrents/downloads","issues_url":"https://api.github.com/repos/opencurrents/opencurrents/issues{/number}","pulls_url":"https://api.github.com/repos/opencurrents/opencurrents/pulls{/number}","milestones_url":"https://api.github.com/repos/opencurrents/opencurrents/milestones{/number}","notifications_url":"https://api.github.com/repos/opencurrents/opencurrents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencurrents/opencurrents/labels{/name}","releases_url":"https://api.github.com/repos/opencurrents/opencurrents/releases{/id}","deployments_url":"https://api.github.com/repos/opencurrents/opencurrents/deployments","created_at":"2017-02-07T05:18:52Z","updated_at":"2017-05-22T00:26:47Z","pushed_at":"2017-06-26T09:14:17Z","git_url":"git://github.com/opencurrents/opencurrents.git","ssh_url":"git@github.com:opencurrents/opencurrents.git","clone_url":"https://github.com/opencurrents/opencurrents.git","svn_url":"https://github.com/opencurrents/opencurrents","homepage":null,"size":39279,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":39,"forks":2,"open_issues":39,"watchers":0,"default_branch":"master"}},"base":{"label":"opencurrents:master","ref":"master","sha":"30e647818521785f02b27c1c2d2ccb6353864f22","user":{"login":"opencurrents","id":25483642,"avatar_url":"https://avatars3.githubusercontent.com/u/25483642?v=3","gravatar_id":"","url":"https://api.github.com/users/opencurrents","html_url":"https://github.com/opencurrents","followers_url":"https://api.github.com/users/opencurrents/followers","following_url":"https://api.github.com/users/opencurrents/following{/other_user}","gists_url":"https://api.github.com/users/opencurrents/gists{/gist_id}","starred_url":"https://api.github.com/users/opencurrents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencurrents/subscriptions","organizations_url":"https://api.github.com/users/opencurrents/orgs","repos_url":"https://api.github.com/users/opencurrents/repos","events_url":"https://api.github.com/users/opencurrents/events{/privacy}","received_events_url":"https://api.github.com/users/opencurrents/received_events","type":"Organization","site_admin":false},"repo":{"id":81169454,"name":"opencurrents","full_name":"opencurrents/opencurrents","owner":{"login":"opencurrents","id":25483642,"avatar_url":"https://avatars3.githubusercontent.com/u/25483642?v=3","gravatar_id":"","url":"https://api.github.com/users/opencurrents","html_url":"https://github.com/opencurrents","followers_url":"https://api.github.com/users/opencurrents/followers","following_url":"https://api.github.com/users/opencurrents/following{/other_user}","gists_url":"https://api.github.com/users/opencurrents/gists{/gist_id}","starred_url":"https://api.github.com/users/opencurrents/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opencurrents/subscriptions","organizations_url":"https://api.github.com/users/opencurrents/orgs","repos_url":"https://api.github.com/users/opencurrents/repos","events_url":"https://api.github.com/users/opencurrents/events{/privacy}","received_events_url":"https://api.github.com/users/opencurrents/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opencurrents/opencurrents","description":null,"fork":false,"url":"https://api.github.com/repos/opencurrents/opencurrents","forks_url":"https://api.github.com/repos/opencurrents/opencurrents/forks","keys_url":"https://api.github.com/repos/opencurrents/opencurrents/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opencurrents/opencurrents/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opencurrents/opencurrents/teams","hooks_url":"https://api.github.com/repos/opencurrents/opencurrents/hooks","issue_events_url":"https://api.github.com/repos/opencurrents/opencurrents/issues/events{/number}","events_url":"https://api.github.com/repos/opencurrents/opencurrents/events","assignees_url":"https://api.github.com/repos/opencurrents/opencurrents/assignees{/user}","branches_url":"https://api.github.com/repos/opencurrents/opencurrents/branches{/branch}","tags_url":"https://api.github.com/repos/opencurrents/opencurrents/tags","blobs_url":"https://api.github.com/repos/opencurrents/opencurrents/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opencurrents/opencurrents/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opencurrents/opencurrents/git/refs{/sha}","trees_url":"https://api.github.com/repos/opencurrents/opencurrents/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opencurrents/opencurrents/statuses/{sha}","languages_url":"https://api.github.com/repos/opencurrents/opencurrents/languages","stargazers_url":"https://api.github.com/repos/opencurrents/opencurrents/stargazers","contributors_url":"https://api.github.com/repos/opencurrents/opencurrents/contributors","subscribers_url":"https://api.github.com/repos/opencurrents/opencurrents/subscribers","subscription_url":"https://api.github.com/repos/opencurrents/opencurrents/subscription","commits_url":"https://api.github.com/repos/opencurrents/opencurrents/commits{/sha}","git_commits_url":"https://api.github.com/repos/opencurrents/opencurrents/git/commits{/sha}","comments_url":"https://api.github.com/repos/opencurrents/opencurrents/comments{/number}","issue_comment_url":"https://api.github.com/repos/opencurrents/opencurrents/issues/comments{/number}","contents_url":"https://api.github.com/repos/opencurrents/opencurrents/contents/{+path}","compare_url":"https://api.github.com/repos/opencurrents/opencurrents/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opencurrents/opencurrents/merges","archive_url":"https://api.github.com/repos/opencurrents/opencurrents/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opencurrents/opencurrents/downloads","issues_url":"https://api.github.com/repos/opencurrents/opencurrents/issues{/number}","pulls_url":"https://api.github.com/repos/opencurrents/opencurrents/pulls{/number}","milestones_url":"https://api.github.com/repos/opencurrents/opencurrents/milestones{/number}","notifications_url":"https://api.github.com/repos/opencurrents/opencurrents/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opencurrents/opencurrents/labels{/name}","releases_url":"https://api.github.com/repos/opencurrents/opencurrents/releases{/id}","deployments_url":"https://api.github.com/repos/opencurrents/opencurrents/deployments","created_at":"2017-02-07T05:18:52Z","updated_at":"2017-05-22T00:26:47Z","pushed_at":"2017-06-26T09:14:17Z","git_url":"git://github.com/opencurrents/opencurrents.git","ssh_url":"git@github.com:opencurrents/opencurrents.git","clone_url":"https://github.com/opencurrents/opencurrents.git","svn_url":"https://github.com/opencurrents/opencurrents","homepage":null,"size":39279,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":39,"forks":2,"open_issues":39,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opencurrents/opencurrents/pulls/100"},"html":{"href":"https://github.com/opencurrents/opencurrents/pull/100"},"issue":{"href":"https://api.github.com/repos/opencurrents/opencurrents/issues/100"},"comments":{"href":"https://api.github.com/repos/opencurrents/opencurrents/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/opencurrents/opencurrents/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/opencurrents/opencurrents/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/opencurrents/opencurrents/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/opencurrents/opencurrents/statuses/32c5761ddc464bca76c2f4351461623293fdf920"}}}}
{"actor":{"display_login":"karbmk"}}