{"action":"created","comment":{"url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/comments/73007156","id":73007156,"diff_hunk":"@@ -205,6 +206,37 @@ def get_user_password(username):\n     except Exception as e:\n         raise Exception('Transaction Error Occurred: ' + str(e))\n \n+def get_user_email(username):\n+    \"\"\"\n+    Obtains email for the requested user.\n+    \"\"\"\n+\n+    values = {}\n+    values['username'] = username\n+    auth_stmt_get = session.prepare(\n+        'SELECT email'\n+        + ' FROM ' + os.environ.get('DB_USER_TABLE')\n+        + ' WHERE username=?'\n+    )\n+    bound = auth_stmt_get.bind(values)\n+    session.row_factory = named_tuple_factory\n+\n+    try:\n+        if username == '':\n+            raise PlantalyticsLoginException(EMAIL_ERROR)","path":"src/cassy.py","position":29,"original_position":29,"commit_id":"a215fb11dd43585289537357e643049cc393d785","original_commit_id":"a215fb11dd43585289537357e643049cc393d785","user":{"login":"scotte216","id":13461180,"avatar_url":"https://avatars.githubusercontent.com/u/13461180?v=3","gravatar_id":"","url":"https://api.github.com/users/scotte216","html_url":"https://github.com/scotte216","followers_url":"https://api.github.com/users/scotte216/followers","following_url":"https://api.github.com/users/scotte216/following{/other_user}","gists_url":"https://api.github.com/users/scotte216/gists{/gist_id}","starred_url":"https://api.github.com/users/scotte216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scotte216/subscriptions","organizations_url":"https://api.github.com/users/scotte216/orgs","repos_url":"https://api.github.com/users/scotte216/repos","events_url":"https://api.github.com/users/scotte216/events{/privacy}","received_events_url":"https://api.github.com/users/scotte216/received_events","type":"User","site_admin":false},"body":"The EMAIL_ERROR doesn't necessarily seem like a LoginException. Although there is no functional difference between our PlantalyticExceptions, they're there for book-keeping purposes so it might be useful to create a new one. Or not. ","created_at":"2016-08-01T16:19:17Z","updated_at":"2016-08-01T16:19:17Z","html_url":"https://github.com/Plantalytics/plantalytics-backend/pull/45#discussion_r73007156","pull_request_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/comments/73007156"},"html":{"href":"https://github.com/Plantalytics/plantalytics-backend/pull/45#discussion_r73007156"},"pull_request":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/45","id":79510707,"html_url":"https://github.com/Plantalytics/plantalytics-backend/pull/45","diff_url":"https://github.com/Plantalytics/plantalytics-backend/pull/45.diff","patch_url":"https://github.com/Plantalytics/plantalytics-backend/pull/45.patch","issue_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues/45","number":45,"state":"open","locked":false,"title":"BE#31: Password Endpoints","user":{"login":"SoySauceLabs","id":18404087,"avatar_url":"https://avatars.githubusercontent.com/u/18404087?v=3","gravatar_id":"","url":"https://api.github.com/users/SoySauceLabs","html_url":"https://github.com/SoySauceLabs","followers_url":"https://api.github.com/users/SoySauceLabs/followers","following_url":"https://api.github.com/users/SoySauceLabs/following{/other_user}","gists_url":"https://api.github.com/users/SoySauceLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/SoySauceLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SoySauceLabs/subscriptions","organizations_url":"https://api.github.com/users/SoySauceLabs/orgs","repos_url":"https://api.github.com/users/SoySauceLabs/repos","events_url":"https://api.github.com/users/SoySauceLabs/events{/privacy}","received_events_url":"https://api.github.com/users/SoySauceLabs/received_events","type":"User","site_admin":false},"body":"# What To Test:\r\n\r\n## Using Postman - test the endpoints with the content in the doc repo:\r\n- [ ] **Project Documentation > Wiki+Reference > BE > Password Endpoint Tests**\r\n\r\n## Expected Results:\r\nFirst...\r\n- [ ] Log in to the DB to make observations in the **user** table.\r\n\r\nThen...\r\n- [ ] Observe password changes on **/password/change** endpoint using requests from **Password Endpoint Tests**.\r\n- [ ] Note the _before_ password (in the DB) for the test user in **Password Endpoint Tests** for the **/password/reset** endpoint.\r\n- [ ] Send request from **Password Endpoint Tests** the **/password/reset** endpoint.\r\n- [ ]  Log in to email account listed in **Project Documentation > Wiki+Reference > BE > Password Reset Email**.\r\n- [ ] Observe new email in inbox with password reset link.\r\n- [ ] Observe password changes (in the DB) for the test user in **Password Endpoint Tests** for  **/password/password_rest** endpoint using request from **Password Endpoint Tests**","created_at":"2016-08-01T04:07:40Z","updated_at":"2016-08-01T16:19:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9402ec0350a41871ce7584ca2ba10314f31fc967","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/45/commits","review_comments_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/45/comments","review_comment_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues/45/comments","statuses_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/statuses/a215fb11dd43585289537357e643049cc393d785","head":{"label":"Plantalytics:Password-Endpoints","ref":"Password-Endpoints","sha":"a215fb11dd43585289537357e643049cc393d785","user":{"login":"Plantalytics","id":19215017,"avatar_url":"https://avatars.githubusercontent.com/u/19215017?v=3","gravatar_id":"","url":"https://api.github.com/users/Plantalytics","html_url":"https://github.com/Plantalytics","followers_url":"https://api.github.com/users/Plantalytics/followers","following_url":"https://api.github.com/users/Plantalytics/following{/other_user}","gists_url":"https://api.github.com/users/Plantalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/Plantalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plantalytics/subscriptions","organizations_url":"https://api.github.com/users/Plantalytics/orgs","repos_url":"https://api.github.com/users/Plantalytics/repos","events_url":"https://api.github.com/users/Plantalytics/events{/privacy}","received_events_url":"https://api.github.com/users/Plantalytics/received_events","type":"Organization","site_admin":false},"repo":{"id":60988374,"name":"plantalytics-backend","full_name":"Plantalytics/plantalytics-backend","owner":{"login":"Plantalytics","id":19215017,"avatar_url":"https://avatars.githubusercontent.com/u/19215017?v=3","gravatar_id":"","url":"https://api.github.com/users/Plantalytics","html_url":"https://github.com/Plantalytics","followers_url":"https://api.github.com/users/Plantalytics/followers","following_url":"https://api.github.com/users/Plantalytics/following{/other_user}","gists_url":"https://api.github.com/users/Plantalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/Plantalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plantalytics/subscriptions","organizations_url":"https://api.github.com/users/Plantalytics/orgs","repos_url":"https://api.github.com/users/Plantalytics/repos","events_url":"https://api.github.com/users/Plantalytics/events{/privacy}","received_events_url":"https://api.github.com/users/Plantalytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Plantalytics/plantalytics-backend","description":"All the stuff that's not pretty to look at. ;)","fork":false,"url":"https://api.github.com/repos/Plantalytics/plantalytics-backend","forks_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/forks","keys_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/teams","hooks_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/hooks","issue_events_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues/events{/number}","events_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/events","assignees_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/assignees{/user}","branches_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/branches{/branch}","tags_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/tags","blobs_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/languages","stargazers_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/stargazers","contributors_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/contributors","subscribers_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/subscribers","subscription_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/subscription","commits_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/contents/{+path}","compare_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/merges","archive_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/downloads","issues_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues{/number}","pulls_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/labels{/name}","releases_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/releases{/id}","deployments_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/deployments","created_at":"2016-06-12T20:43:56Z","updated_at":"2016-07-15T20:57:30Z","pushed_at":"2016-08-01T05:59:23Z","git_url":"git://github.com/Plantalytics/plantalytics-backend.git","ssh_url":"git@github.com:Plantalytics/plantalytics-backend.git","clone_url":"https://github.com/Plantalytics/plantalytics-backend.git","svn_url":"https://github.com/Plantalytics/plantalytics-backend","homepage":null,"size":168,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"base":{"label":"Plantalytics:develop","ref":"develop","sha":"a60449487b54df374a5fb68d5c07c84da6c678d9","user":{"login":"Plantalytics","id":19215017,"avatar_url":"https://avatars.githubusercontent.com/u/19215017?v=3","gravatar_id":"","url":"https://api.github.com/users/Plantalytics","html_url":"https://github.com/Plantalytics","followers_url":"https://api.github.com/users/Plantalytics/followers","following_url":"https://api.github.com/users/Plantalytics/following{/other_user}","gists_url":"https://api.github.com/users/Plantalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/Plantalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plantalytics/subscriptions","organizations_url":"https://api.github.com/users/Plantalytics/orgs","repos_url":"https://api.github.com/users/Plantalytics/repos","events_url":"https://api.github.com/users/Plantalytics/events{/privacy}","received_events_url":"https://api.github.com/users/Plantalytics/received_events","type":"Organization","site_admin":false},"repo":{"id":60988374,"name":"plantalytics-backend","full_name":"Plantalytics/plantalytics-backend","owner":{"login":"Plantalytics","id":19215017,"avatar_url":"https://avatars.githubusercontent.com/u/19215017?v=3","gravatar_id":"","url":"https://api.github.com/users/Plantalytics","html_url":"https://github.com/Plantalytics","followers_url":"https://api.github.com/users/Plantalytics/followers","following_url":"https://api.github.com/users/Plantalytics/following{/other_user}","gists_url":"https://api.github.com/users/Plantalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/Plantalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Plantalytics/subscriptions","organizations_url":"https://api.github.com/users/Plantalytics/orgs","repos_url":"https://api.github.com/users/Plantalytics/repos","events_url":"https://api.github.com/users/Plantalytics/events{/privacy}","received_events_url":"https://api.github.com/users/Plantalytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Plantalytics/plantalytics-backend","description":"All the stuff that's not pretty to look at. ;)","fork":false,"url":"https://api.github.com/repos/Plantalytics/plantalytics-backend","forks_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/forks","keys_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/teams","hooks_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/hooks","issue_events_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues/events{/number}","events_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/events","assignees_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/assignees{/user}","branches_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/branches{/branch}","tags_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/tags","blobs_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/languages","stargazers_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/stargazers","contributors_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/contributors","subscribers_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/subscribers","subscription_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/subscription","commits_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/contents/{+path}","compare_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/merges","archive_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/downloads","issues_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues{/number}","pulls_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/labels{/name}","releases_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/releases{/id}","deployments_url":"https://api.github.com/repos/Plantalytics/plantalytics-backend/deployments","created_at":"2016-06-12T20:43:56Z","updated_at":"2016-07-15T20:57:30Z","pushed_at":"2016-08-01T05:59:23Z","git_url":"git://github.com/Plantalytics/plantalytics-backend.git","ssh_url":"git@github.com:Plantalytics/plantalytics-backend.git","clone_url":"https://github.com/Plantalytics/plantalytics-backend.git","svn_url":"https://github.com/Plantalytics/plantalytics-backend","homepage":null,"size":168,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/45"},"html":{"href":"https://github.com/Plantalytics/plantalytics-backend/pull/45"},"issue":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues/45"},"comments":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/Plantalytics/plantalytics-backend/statuses/a215fb11dd43585289537357e643049cc393d785"}}}}
{"actor":{"display_login":"scotte216"}}