{"action":"created","comment":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments/123518682","pull_request_review_id":45729737,"id":123518682,"diff_hunk":"@@ -168,17 +169,94 @@ def _create_resource_helper(self, upload_file_path, resource_title=None):\n             return resource_title\n \n         def test_register_account(self):\n+            usr = {\n+                'fn': '<strong>First</strong>',\n+                'ln': 'last',\n+                'email': 'u@example.com',\n+                'user': 'uname',\n+                'pass': 'drowssap',\n+                'org': 'My University',\n+                'title': 'Adjunct'\n+             }\n+\n             login_link_css_selector = 'a[href=\"{}\"]'.format(reverse('login'))\n             for e in self.driver.find_elements(By.CSS_SELECTOR, login_link_css_selector):\n                 if e.is_displayed():\n                     e.click()\n                     break\n \n-            self.assertTrue(reverse('login') in self.driver.current_url)\n             # there is nothing to reverse() for sign-up because it is hard coded via Mezzanine\n             self.wait_for_visible(By.CSS_SELECTOR, 'a[href=\"/sign-up/?next=\"]').click()\n             self.wait_for_visible(By.CSS_SELECTOR, '#form-signup')\n \n+            # monkey patch SignUpForm to always verify the captcha\n+            from theme.forms import SignupForm\n+            def verify_captcha_patch(*args, **kwargs):\n+                return True\n+            SignupForm.verify_captcha = verify_captcha_patch\n+\n+            # Register a new account\n+            self.wait_for_visible(By.CSS_SELECTOR, 'input[name=\"first_name\"]').send_keys(usr['fn'])\n+            self.wait_for_visible(By.CSS_SELECTOR, 'input[name=\"last_name\"]').send_keys(usr['ln'])\n+            self.wait_for_visible(By.CSS_SELECTOR, 'input[name=\"email\"]').send_keys(usr['email'])\n+            self.wait_for_visible(By.CSS_SELECTOR, 'input[name=\"username\"]').send_keys(usr['user'])\n+            self.wait_for_visible(By.CSS_SELECTOR, 'input[name=\"password1\"]').send_keys(usr['pass'])\n+            self.wait_for_visible(By.CSS_SELECTOR, 'input[name=\"password2\"]').send_keys(usr['pass'])\n+            self.wait_for_visible(By.CSS_SELECTOR, 'input[name=\"recaptcha_response_field\"]').send_keys('response')\n+            self.wait_for_visible(By.CSS_SELECTOR, 'input#signup').click()\n+\n+            # Verify new account by clicking on link in that came in email\n+            self.wait_for_visible(By.CSS_SELECTOR, '#home-page-carousel')\n+            alert_div =  self.wait_for_visible(By.CSS_SELECTOR, '.page-tip')\n+            alert_text = alert_div.find_element(By.CSS_SELECTOR, 'p').text\n+            self.assertIn('A verification email has been sent', alert_text)\n+\n+            self.assertEqual(len(mail.outbox), 1)\n+            url = re.search(r'(?P<url>https?://[^\\s]+)', mail.outbox[0].body).groupdict()['url']\n+            user = User.objects.get(email=usr['email'])\n+            self.assertFalse(user.is_active)\n+            with self.assertRaises(ValueError):\n+                _ = user.userprofile.cv.url","path":"theme/tests/multiplatform.py","position":60,"original_position":60,"commit_id":"943abe290e0f4b53998ca9b1113397bd242e3b7b","original_commit_id":"943abe290e0f4b53998ca9b1113397bd242e3b7b","user":{"login":"aphelionz","id":106148,"avatar_url":"https://avatars2.githubusercontent.com/u/106148?v=3","gravatar_id":"","url":"https://api.github.com/users/aphelionz","html_url":"https://github.com/aphelionz","followers_url":"https://api.github.com/users/aphelionz/followers","following_url":"https://api.github.com/users/aphelionz/following{/other_user}","gists_url":"https://api.github.com/users/aphelionz/gists{/gist_id}","starred_url":"https://api.github.com/users/aphelionz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aphelionz/subscriptions","organizations_url":"https://api.github.com/users/aphelionz/orgs","repos_url":"https://api.github.com/users/aphelionz/repos","events_url":"https://api.github.com/users/aphelionz/events{/privacy}","received_events_url":"https://api.github.com/users/aphelionz/received_events","type":"User","site_admin":false},"body":"Mostly curious - what's the purpose of this throwaway assignment?","created_at":"2017-06-22T14:03:44Z","updated_at":"2017-06-22T14:05:26Z","html_url":"https://github.com/hydroshare/hydroshare/pull/2178#discussion_r123518682","pull_request_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/2178","_links":{"self":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments/123518682"},"html":{"href":"https://github.com/hydroshare/hydroshare/pull/2178#discussion_r123518682"},"pull_request":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/2178"}}},"pull_request":{"url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/2178","id":126799298,"html_url":"https://github.com/hydroshare/hydroshare/pull/2178","diff_url":"https://github.com/hydroshare/hydroshare/pull/2178.diff","patch_url":"https://github.com/hydroshare/hydroshare/pull/2178.patch","issue_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/2178","number":2178,"state":"open","locked":false,"title":"2165 registration selenium","user":{"login":"alexlemann","id":46069,"avatar_url":"https://avatars2.githubusercontent.com/u/46069?v=3","gravatar_id":"","url":"https://api.github.com/users/alexlemann","html_url":"https://github.com/alexlemann","followers_url":"https://api.github.com/users/alexlemann/followers","following_url":"https://api.github.com/users/alexlemann/following{/other_user}","gists_url":"https://api.github.com/users/alexlemann/gists{/gist_id}","starred_url":"https://api.github.com/users/alexlemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexlemann/subscriptions","organizations_url":"https://api.github.com/users/alexlemann/orgs","repos_url":"https://api.github.com/users/alexlemann/repos","events_url":"https://api.github.com/users/alexlemann/events{/privacy}","received_events_url":"https://api.github.com/users/alexlemann/received_events","type":"User","site_admin":false},"body":"PR for selenium testing user registration workflow. Mocks CAPTCHA validation. See #2165.","created_at":"2017-06-21T15:52:01Z","updated_at":"2017-06-22T14:05:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09b40b970c64731d298e68454452581527892b03","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/2178/commits","review_comments_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/2178/comments","review_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/2178/comments","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/943abe290e0f4b53998ca9b1113397bd242e3b7b","head":{"label":"hydroshare:2165-registration-selenium","ref":"2165-registration-selenium","sha":"943abe290e0f4b53998ca9b1113397bd242e3b7b","user":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars2.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"repo":{"id":24703136,"name":"hydroshare","full_name":"hydroshare/hydroshare","owner":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars2.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydroshare/hydroshare","description":"HydroShare is a collaborative website being developed for better access to data and models in the hydrologic sciences. ","fork":false,"url":"https://api.github.com/repos/hydroshare/hydroshare","forks_url":"https://api.github.com/repos/hydroshare/hydroshare/forks","keys_url":"https://api.github.com/repos/hydroshare/hydroshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydroshare/hydroshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydroshare/hydroshare/teams","hooks_url":"https://api.github.com/repos/hydroshare/hydroshare/hooks","issue_events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/events{/number}","events_url":"https://api.github.com/repos/hydroshare/hydroshare/events","assignees_url":"https://api.github.com/repos/hydroshare/hydroshare/assignees{/user}","branches_url":"https://api.github.com/repos/hydroshare/hydroshare/branches{/branch}","tags_url":"https://api.github.com/repos/hydroshare/hydroshare/tags","blobs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydroshare/hydroshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydroshare/hydroshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/{sha}","languages_url":"https://api.github.com/repos/hydroshare/hydroshare/languages","stargazers_url":"https://api.github.com/repos/hydroshare/hydroshare/stargazers","contributors_url":"https://api.github.com/repos/hydroshare/hydroshare/contributors","subscribers_url":"https://api.github.com/repos/hydroshare/hydroshare/subscribers","subscription_url":"https://api.github.com/repos/hydroshare/hydroshare/subscription","commits_url":"https://api.github.com/repos/hydroshare/hydroshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydroshare/hydroshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydroshare/hydroshare/contents/{+path}","compare_url":"https://api.github.com/repos/hydroshare/hydroshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydroshare/hydroshare/merges","archive_url":"https://api.github.com/repos/hydroshare/hydroshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydroshare/hydroshare/downloads","issues_url":"https://api.github.com/repos/hydroshare/hydroshare/issues{/number}","pulls_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls{/number}","milestones_url":"https://api.github.com/repos/hydroshare/hydroshare/milestones{/number}","notifications_url":"https://api.github.com/repos/hydroshare/hydroshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/labels{/name}","releases_url":"https://api.github.com/repos/hydroshare/hydroshare/releases{/id}","deployments_url":"https://api.github.com/repos/hydroshare/hydroshare/deployments","created_at":"2014-10-02T02:19:41Z","updated_at":"2017-05-29T20:33:48Z","pushed_at":"2017-06-22T14:04:44Z","git_url":"git://github.com/hydroshare/hydroshare.git","ssh_url":"git@github.com:hydroshare/hydroshare.git","clone_url":"https://github.com/hydroshare/hydroshare.git","svn_url":"https://github.com/hydroshare/hydroshare","homepage":"https://www.hydroshare.org","size":214339,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":265,"forks":7,"open_issues":265,"watchers":29,"default_branch":"develop"}},"base":{"label":"hydroshare:develop","ref":"develop","sha":"0bfe9da398dbd837ff6be33850190e22e35d1316","user":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars2.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"repo":{"id":24703136,"name":"hydroshare","full_name":"hydroshare/hydroshare","owner":{"login":"hydroshare","id":3444493,"avatar_url":"https://avatars2.githubusercontent.com/u/3444493?v=3","gravatar_id":"","url":"https://api.github.com/users/hydroshare","html_url":"https://github.com/hydroshare","followers_url":"https://api.github.com/users/hydroshare/followers","following_url":"https://api.github.com/users/hydroshare/following{/other_user}","gists_url":"https://api.github.com/users/hydroshare/gists{/gist_id}","starred_url":"https://api.github.com/users/hydroshare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydroshare/subscriptions","organizations_url":"https://api.github.com/users/hydroshare/orgs","repos_url":"https://api.github.com/users/hydroshare/repos","events_url":"https://api.github.com/users/hydroshare/events{/privacy}","received_events_url":"https://api.github.com/users/hydroshare/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hydroshare/hydroshare","description":"HydroShare is a collaborative website being developed for better access to data and models in the hydrologic sciences. ","fork":false,"url":"https://api.github.com/repos/hydroshare/hydroshare","forks_url":"https://api.github.com/repos/hydroshare/hydroshare/forks","keys_url":"https://api.github.com/repos/hydroshare/hydroshare/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hydroshare/hydroshare/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hydroshare/hydroshare/teams","hooks_url":"https://api.github.com/repos/hydroshare/hydroshare/hooks","issue_events_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/events{/number}","events_url":"https://api.github.com/repos/hydroshare/hydroshare/events","assignees_url":"https://api.github.com/repos/hydroshare/hydroshare/assignees{/user}","branches_url":"https://api.github.com/repos/hydroshare/hydroshare/branches{/branch}","tags_url":"https://api.github.com/repos/hydroshare/hydroshare/tags","blobs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hydroshare/hydroshare/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hydroshare/hydroshare/git/refs{/sha}","trees_url":"https://api.github.com/repos/hydroshare/hydroshare/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hydroshare/hydroshare/statuses/{sha}","languages_url":"https://api.github.com/repos/hydroshare/hydroshare/languages","stargazers_url":"https://api.github.com/repos/hydroshare/hydroshare/stargazers","contributors_url":"https://api.github.com/repos/hydroshare/hydroshare/contributors","subscribers_url":"https://api.github.com/repos/hydroshare/hydroshare/subscribers","subscription_url":"https://api.github.com/repos/hydroshare/hydroshare/subscription","commits_url":"https://api.github.com/repos/hydroshare/hydroshare/commits{/sha}","git_commits_url":"https://api.github.com/repos/hydroshare/hydroshare/git/commits{/sha}","comments_url":"https://api.github.com/repos/hydroshare/hydroshare/comments{/number}","issue_comment_url":"https://api.github.com/repos/hydroshare/hydroshare/issues/comments{/number}","contents_url":"https://api.github.com/repos/hydroshare/hydroshare/contents/{+path}","compare_url":"https://api.github.com/repos/hydroshare/hydroshare/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hydroshare/hydroshare/merges","archive_url":"https://api.github.com/repos/hydroshare/hydroshare/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hydroshare/hydroshare/downloads","issues_url":"https://api.github.com/repos/hydroshare/hydroshare/issues{/number}","pulls_url":"https://api.github.com/repos/hydroshare/hydroshare/pulls{/number}","milestones_url":"https://api.github.com/repos/hydroshare/hydroshare/milestones{/number}","notifications_url":"https://api.github.com/repos/hydroshare/hydroshare/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hydroshare/hydroshare/labels{/name}","releases_url":"https://api.github.com/repos/hydroshare/hydroshare/releases{/id}","deployments_url":"https://api.github.com/repos/hydroshare/hydroshare/deployments","created_at":"2014-10-02T02:19:41Z","updated_at":"2017-05-29T20:33:48Z","pushed_at":"2017-06-22T14:04:44Z","git_url":"git://github.com/hydroshare/hydroshare.git","ssh_url":"git@github.com:hydroshare/hydroshare.git","clone_url":"https://github.com/hydroshare/hydroshare.git","svn_url":"https://github.com/hydroshare/hydroshare","homepage":"https://www.hydroshare.org","size":214339,"stargazers_count":29,"watchers_count":29,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":265,"forks":7,"open_issues":265,"watchers":29,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/2178"},"html":{"href":"https://github.com/hydroshare/hydroshare/pull/2178"},"issue":{"href":"https://api.github.com/repos/hydroshare/hydroshare/issues/2178"},"comments":{"href":"https://api.github.com/repos/hydroshare/hydroshare/issues/2178/comments"},"review_comments":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/2178/comments"},"review_comment":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hydroshare/hydroshare/pulls/2178/commits"},"statuses":{"href":"https://api.github.com/repos/hydroshare/hydroshare/statuses/943abe290e0f4b53998ca9b1113397bd242e3b7b"}}}}
{"actor":{"display_login":"aphelionz"}}