{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/comments/32608474","id":32608474,"diff_hunk":"@@ -22,29 +42,25 @@ def test_url_with_non_canonical_trailing_slash(self):\n         self.assertEquals(301, response.status_code)\n         self.assertEquals(\"http://localhost/admin\", response.location)\n \n-    def test_login(self):\n-        response = self.client.post('/admin/login', data=dict(\n+    def test_valid_login(self):\n+        self._login(\n             username=\"admin\",\n             password=\"admin\"\n-        ))\n-        self.assertEquals(302, response.status_code)\n-        self.assertEquals(\"/admin\", urlsplit(response.location).path)\n-\n-        response = self.client.get('/admin')\n-        self.assertEquals(200, response.status_code)\n-        self.assertIn('Secure;', response.headers['Set-Cookie'])\n-        self.assertIn('DENY', response.headers['X-Frame-Options'])\n+        )\n \n-    def test_invalid_login(self):\n-        response = self.client.post('/admin/login', data=dict(\n-            username=\"admin\",\n-            password=\"wrong\"\n-        ))\n-        self.assertEquals(200, response.status_code)\n+    def test_invalid_logins(self):\n+        invalid_logins = [\n+            (\"admin\", \"wrong\"),\n+            (\"adminadmin\", \"\"),\n+            (\"\", \"adminadmin\")","path":"tests/app/main/test_views.py","position":57,"original_position":57,"commit_id":"cfe18cc92f58e44cb74f38e8a531fc2f04a51663","original_commit_id":"cfe18cc92f58e44cb74f38e8a531fc2f04a51663","user":{"login":"TheDoubleK","id":6525554,"avatar_url":"https://avatars.githubusercontent.com/u/6525554?v=3","gravatar_id":"","url":"https://api.github.com/users/TheDoubleK","html_url":"https://github.com/TheDoubleK","followers_url":"https://api.github.com/users/TheDoubleK/followers","following_url":"https://api.github.com/users/TheDoubleK/following{/other_user}","gists_url":"https://api.github.com/users/TheDoubleK/gists{/gist_id}","starred_url":"https://api.github.com/users/TheDoubleK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheDoubleK/subscriptions","organizations_url":"https://api.github.com/users/TheDoubleK/orgs","repos_url":"https://api.github.com/users/TheDoubleK/repos","events_url":"https://api.github.com/users/TheDoubleK/events{/privacy}","received_events_url":"https://api.github.com/users/TheDoubleK/received_events","type":"User","site_admin":false},"body":"I think we can live with it until we wire in the proper API auth - coming soon!","created_at":"2015-06-17T09:23:00Z","updated_at":"2015-06-17T09:23:00Z","html_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/75#discussion_r32608474","pull_request_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/75","_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/comments/32608474"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/75#discussion_r32608474"},"pull_request":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/75"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/75","id":37809218,"html_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/75","diff_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/75.diff","patch_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/75.patch","issue_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/75","number":75,"state":"open","locked":false,"title":"Prohibit empty username or password.","user":{"login":"pcraig3","id":2454380,"avatar_url":"https://avatars.githubusercontent.com/u/2454380?v=3","gravatar_id":"","url":"https://api.github.com/users/pcraig3","html_url":"https://github.com/pcraig3","followers_url":"https://api.github.com/users/pcraig3/followers","following_url":"https://api.github.com/users/pcraig3/following{/other_user}","gists_url":"https://api.github.com/users/pcraig3/gists{/gist_id}","starred_url":"https://api.github.com/users/pcraig3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcraig3/subscriptions","organizations_url":"https://api.github.com/users/pcraig3/orgs","repos_url":"https://api.github.com/users/pcraig3/repos","events_url":"https://api.github.com/users/pcraig3/events{/privacy}","received_events_url":"https://api.github.com/users/pcraig3/received_events","type":"User","site_admin":false},"body":"App will reject empty usernames or passwords, tests have been extended to reflect this.\r\nAlso isolated the header verification test to bring it more in line with what's happening in the [buyer app](https://github.com/alphagov/digitalmarketplace-buyer-frontend/blob/master/tests/test_application.py#L26) and the [supplier app](https://github.com/alphagov/digitalmarketplace-supplier-frontend/blob/master/tests/app/test_application.py#L53).","created_at":"2015-06-16T15:41:18Z","updated_at":"2015-06-17T09:23:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c7f83cfb0374960eac609534b74b6f40826e5fa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/75/commits","review_comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/75/comments","review_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/75/comments","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/statuses/cfe18cc92f58e44cb74f38e8a531fc2f04a51663","head":{"label":"alphagov:pc_pretty_poor_password_protection","ref":"pc_pretty_poor_password_protection","sha":"cfe18cc92f58e44cb74f38e8a531fc2f04a51663","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31009853,"name":"digitalmarketplace-admin-frontend","full_name":"alphagov/digitalmarketplace-admin-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend","description":"Frontend administration application for the digital marketplace","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/releases{/id}","created_at":"2015-02-19T10:09:45Z","updated_at":"2015-05-09T02:29:15Z","pushed_at":"2015-06-17T09:14:23Z","git_url":"git://github.com/alphagov/digitalmarketplace-admin-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-admin-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend","homepage":"","size":1441,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"ffcd37ae2eb9ba3a8481d78a0c173fa79d483902","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31009853,"name":"digitalmarketplace-admin-frontend","full_name":"alphagov/digitalmarketplace-admin-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend","description":"Frontend administration application for the digital marketplace","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/releases{/id}","created_at":"2015-02-19T10:09:45Z","updated_at":"2015-05-09T02:29:15Z","pushed_at":"2015-06-17T09:14:23Z","git_url":"git://github.com/alphagov/digitalmarketplace-admin-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-admin-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend","homepage":"","size":1441,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/75"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/75"},"issue":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/75"},"comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/75/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/75/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/75/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/statuses/cfe18cc92f58e44cb74f38e8a531fc2f04a51663"}}}}