{"action":"created","comment":{"url":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/comments/159158888","pull_request_review_id":86065195,"id":159158888,"diff_hunk":"@@ -0,0 +1,40 @@\n+\"\"\"Unit tests for Elsevier\"\"\"\n+\n+from unittest import TestCase, skip\n+\n+from ...test.utils import assert_stream\n+from .elsevier import get_elsevier_fulltext\n+\n+class GetElsevierFulltextTest(TestCase):\n+    \"\"\"Test get_elsevier_fulltext\"\"\"\n+\n+    @skip('Elsevier API currently does not return full texts but only page 1 '\n+          '(re-enable with a working API key)')\n+    @staticmethod\n+    def test_sha1():\n+        \"\"\"Compare SHA1 and filename\"\"\"\n+        get_elsevier_fulltext(\n+            '10.1016/j.physletb.2016.07.042',\n+            assert_stream('4724fea61643131e32dd4267608f977ffeafb70e', 'fulltext.pdf'),\n+            apikey='f7840794d3322d4b56a9cf687aecfccb'\n+            )\n+\n+    def test_incomplete_pdf(self):\n+        \"\"\"An incomplete PDF (restricted to first page) should be detected\"\"\"\n+        with self.assertRaises(Exception) as context:\n+            get_elsevier_fulltext(\n+                '10.1016/j.physletb.2016.07.042',\n+                lambda stream, filename: None,\n+                apikey='f7840794d3322d4b56a9cf687aecfccb'","path":"libfulltext/doi/crossref/test_elsevier.py","position":28,"original_position":28,"commit_id":"d8e4e9c8760c4bd4a074caeccc5a693e0624c296","original_commit_id":"d8e4e9c8760c4bd4a074caeccc5a693e0624c296","user":{"login":"mfherbst","id":11157893,"avatar_url":"https://avatars0.githubusercontent.com/u/11157893?v=4","gravatar_id":"","url":"https://api.github.com/users/mfherbst","html_url":"https://github.com/mfherbst","followers_url":"https://api.github.com/users/mfherbst/followers","following_url":"https://api.github.com/users/mfherbst/following{/other_user}","gists_url":"https://api.github.com/users/mfherbst/gists{/gist_id}","starred_url":"https://api.github.com/users/mfherbst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfherbst/subscriptions","organizations_url":"https://api.github.com/users/mfherbst/orgs","repos_url":"https://api.github.com/users/mfherbst/repos","events_url":"https://api.github.com/users/mfherbst/events{/privacy}","received_events_url":"https://api.github.com/users/mfherbst/received_events","type":"User","site_admin":false},"body":"Again. Key in the clear.","created_at":"2018-01-01T16:18:40Z","updated_at":"2018-01-01T16:20:43Z","html_url":"https://github.com/andrenarchy/libfulltext/pull/39#discussion_r159158888","pull_request_url":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/39","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/comments/159158888"},"html":{"href":"https://github.com/andrenarchy/libfulltext/pull/39#discussion_r159158888"},"pull_request":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/39","id":160652363,"html_url":"https://github.com/andrenarchy/libfulltext/pull/39","diff_url":"https://github.com/andrenarchy/libfulltext/pull/39.diff","patch_url":"https://github.com/andrenarchy/libfulltext/pull/39.patch","issue_url":"https://api.github.com/repos/andrenarchy/libfulltext/issues/39","number":39,"state":"open","locked":false,"title":"Add basic unit tests for APS, Elsevier and Springer","user":{"login":"andrenarchy","id":1874116,"avatar_url":"https://avatars1.githubusercontent.com/u/1874116?v=4","gravatar_id":"","url":"https://api.github.com/users/andrenarchy","html_url":"https://github.com/andrenarchy","followers_url":"https://api.github.com/users/andrenarchy/followers","following_url":"https://api.github.com/users/andrenarchy/following{/other_user}","gists_url":"https://api.github.com/users/andrenarchy/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenarchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenarchy/subscriptions","organizations_url":"https://api.github.com/users/andrenarchy/orgs","repos_url":"https://api.github.com/users/andrenarchy/repos","events_url":"https://api.github.com/users/andrenarchy/events{/privacy}","received_events_url":"https://api.github.com/users/andrenarchy/received_events","type":"User","site_admin":false},"body":"Fixes #30.\r\n\r\nNote that the Elsevier tests have a `skip()` for the SHA comparison since it doesn't work right now. The API key in the test files is a dummy key that we can replace when we have one that actually works (we can let travis provide it then as an env var so we it's kept secret). ","created_at":"2018-01-01T15:59:10Z","updated_at":"2018-01-01T16:20:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a71a053a537f0283ace0582a856f4799a09ea2d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/39/commits","review_comments_url":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/39/comments","review_comment_url":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andrenarchy/libfulltext/issues/39/comments","statuses_url":"https://api.github.com/repos/andrenarchy/libfulltext/statuses/d8e4e9c8760c4bd4a074caeccc5a693e0624c296","head":{"label":"andrenarchy:feature/30-add-unit-tests","ref":"feature/30-add-unit-tests","sha":"d8e4e9c8760c4bd4a074caeccc5a693e0624c296","user":{"login":"andrenarchy","id":1874116,"avatar_url":"https://avatars1.githubusercontent.com/u/1874116?v=4","gravatar_id":"","url":"https://api.github.com/users/andrenarchy","html_url":"https://github.com/andrenarchy","followers_url":"https://api.github.com/users/andrenarchy/followers","following_url":"https://api.github.com/users/andrenarchy/following{/other_user}","gists_url":"https://api.github.com/users/andrenarchy/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenarchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenarchy/subscriptions","organizations_url":"https://api.github.com/users/andrenarchy/orgs","repos_url":"https://api.github.com/users/andrenarchy/repos","events_url":"https://api.github.com/users/andrenarchy/events{/privacy}","received_events_url":"https://api.github.com/users/andrenarchy/received_events","type":"User","site_admin":false},"repo":{"id":115616624,"name":"libfulltext","full_name":"andrenarchy/libfulltext","owner":{"login":"andrenarchy","id":1874116,"avatar_url":"https://avatars1.githubusercontent.com/u/1874116?v=4","gravatar_id":"","url":"https://api.github.com/users/andrenarchy","html_url":"https://github.com/andrenarchy","followers_url":"https://api.github.com/users/andrenarchy/followers","following_url":"https://api.github.com/users/andrenarchy/following{/other_user}","gists_url":"https://api.github.com/users/andrenarchy/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenarchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenarchy/subscriptions","organizations_url":"https://api.github.com/users/andrenarchy/orgs","repos_url":"https://api.github.com/users/andrenarchy/repos","events_url":"https://api.github.com/users/andrenarchy/events{/privacy}","received_events_url":"https://api.github.com/users/andrenarchy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrenarchy/libfulltext","description":"Tools for downloading fulltexts of open access articles","fork":false,"url":"https://api.github.com/repos/andrenarchy/libfulltext","forks_url":"https://api.github.com/repos/andrenarchy/libfulltext/forks","keys_url":"https://api.github.com/repos/andrenarchy/libfulltext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrenarchy/libfulltext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrenarchy/libfulltext/teams","hooks_url":"https://api.github.com/repos/andrenarchy/libfulltext/hooks","issue_events_url":"https://api.github.com/repos/andrenarchy/libfulltext/issues/events{/number}","events_url":"https://api.github.com/repos/andrenarchy/libfulltext/events","assignees_url":"https://api.github.com/repos/andrenarchy/libfulltext/assignees{/user}","branches_url":"https://api.github.com/repos/andrenarchy/libfulltext/branches{/branch}","tags_url":"https://api.github.com/repos/andrenarchy/libfulltext/tags","blobs_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrenarchy/libfulltext/statuses/{sha}","languages_url":"https://api.github.com/repos/andrenarchy/libfulltext/languages","stargazers_url":"https://api.github.com/repos/andrenarchy/libfulltext/stargazers","contributors_url":"https://api.github.com/repos/andrenarchy/libfulltext/contributors","subscribers_url":"https://api.github.com/repos/andrenarchy/libfulltext/subscribers","subscription_url":"https://api.github.com/repos/andrenarchy/libfulltext/subscription","commits_url":"https://api.github.com/repos/andrenarchy/libfulltext/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrenarchy/libfulltext/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrenarchy/libfulltext/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrenarchy/libfulltext/contents/{+path}","compare_url":"https://api.github.com/repos/andrenarchy/libfulltext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrenarchy/libfulltext/merges","archive_url":"https://api.github.com/repos/andrenarchy/libfulltext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrenarchy/libfulltext/downloads","issues_url":"https://api.github.com/repos/andrenarchy/libfulltext/issues{/number}","pulls_url":"https://api.github.com/repos/andrenarchy/libfulltext/pulls{/number}","milestones_url":"https://api.github.com/repos/andrenarchy/libfulltext/milestones{/number}","notifications_url":"https://api.github.com/repos/andrenarchy/libfulltext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrenarchy/libfulltext/labels{/name}","releases_url":"https://api.github.com/repos/andrenarchy/libfulltext/releases{/id}","deployments_url":"https://api.github.com/repos/andrenarchy/libfulltext/deployments","created_at":"2017-12-28T11:26:12Z","updated_at":"2017-12-30T11:33:14Z","pushed_at":"2018-01-01T16:01:51Z","git_url":"git://github.com/andrenarchy/libfulltext.git","ssh_url":"git@github.com:andrenarchy/libfulltext.git","clone_url":"https://github.com/andrenarchy/libfulltext.git","svn_url":"https://github.com/andrenarchy/libfulltext","homepage":"","size":93,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1,"open_issues":9,"watchers":2,"default_branch":"master"}},"base":{"label":"andrenarchy:master","ref":"master","sha":"e3e452a178f5efb0717cbebdb1f158611fd3af54","user":{"login":"andrenarchy","id":1874116,"avatar_url":"https://avatars1.githubusercontent.com/u/1874116?v=4","gravatar_id":"","url":"https://api.github.com/users/andrenarchy","html_url":"https://github.com/andrenarchy","followers_url":"https://api.github.com/users/andrenarchy/followers","following_url":"https://api.github.com/users/andrenarchy/following{/other_user}","gists_url":"https://api.github.com/users/andrenarchy/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenarchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenarchy/subscriptions","organizations_url":"https://api.github.com/users/andrenarchy/orgs","repos_url":"https://api.github.com/users/andrenarchy/repos","events_url":"https://api.github.com/users/andrenarchy/events{/privacy}","received_events_url":"https://api.github.com/users/andrenarchy/received_events","type":"User","site_admin":false},"repo":{"id":115616624,"name":"libfulltext","full_name":"andrenarchy/libfulltext","owner":{"login":"andrenarchy","id":1874116,"avatar_url":"https://avatars1.githubusercontent.com/u/1874116?v=4","gravatar_id":"","url":"https://api.github.com/users/andrenarchy","html_url":"https://github.com/andrenarchy","followers_url":"https://api.github.com/users/andrenarchy/followers","following_url":"https://api.github.com/users/andrenarchy/following{/other_user}","gists_url":"https://api.github.com/users/andrenarchy/gists{/gist_id}","starred_url":"https://api.github.com/users/andrenarchy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrenarchy/subscriptions","organizations_url":"https://api.github.com/users/andrenarchy/orgs","repos_url":"https://api.github.com/users/andrenarchy/repos","events_url":"https://api.github.com/users/andrenarchy/events{/privacy}","received_events_url":"https://api.github.com/users/andrenarchy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrenarchy/libfulltext","description":"Tools for downloading fulltexts of open access articles","fork":false,"url":"https://api.github.com/repos/andrenarchy/libfulltext","forks_url":"https://api.github.com/repos/andrenarchy/libfulltext/forks","keys_url":"https://api.github.com/repos/andrenarchy/libfulltext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrenarchy/libfulltext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrenarchy/libfulltext/teams","hooks_url":"https://api.github.com/repos/andrenarchy/libfulltext/hooks","issue_events_url":"https://api.github.com/repos/andrenarchy/libfulltext/issues/events{/number}","events_url":"https://api.github.com/repos/andrenarchy/libfulltext/events","assignees_url":"https://api.github.com/repos/andrenarchy/libfulltext/assignees{/user}","branches_url":"https://api.github.com/repos/andrenarchy/libfulltext/branches{/branch}","tags_url":"https://api.github.com/repos/andrenarchy/libfulltext/tags","blobs_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrenarchy/libfulltext/statuses/{sha}","languages_url":"https://api.github.com/repos/andrenarchy/libfulltext/languages","stargazers_url":"https://api.github.com/repos/andrenarchy/libfulltext/stargazers","contributors_url":"https://api.github.com/repos/andrenarchy/libfulltext/contributors","subscribers_url":"https://api.github.com/repos/andrenarchy/libfulltext/subscribers","subscription_url":"https://api.github.com/repos/andrenarchy/libfulltext/subscription","commits_url":"https://api.github.com/repos/andrenarchy/libfulltext/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrenarchy/libfulltext/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrenarchy/libfulltext/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrenarchy/libfulltext/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrenarchy/libfulltext/contents/{+path}","compare_url":"https://api.github.com/repos/andrenarchy/libfulltext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrenarchy/libfulltext/merges","archive_url":"https://api.github.com/repos/andrenarchy/libfulltext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrenarchy/libfulltext/downloads","issues_url":"https://api.github.com/repos/andrenarchy/libfulltext/issues{/number}","pulls_url":"https://api.github.com/repos/andrenarchy/libfulltext/pulls{/number}","milestones_url":"https://api.github.com/repos/andrenarchy/libfulltext/milestones{/number}","notifications_url":"https://api.github.com/repos/andrenarchy/libfulltext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrenarchy/libfulltext/labels{/name}","releases_url":"https://api.github.com/repos/andrenarchy/libfulltext/releases{/id}","deployments_url":"https://api.github.com/repos/andrenarchy/libfulltext/deployments","created_at":"2017-12-28T11:26:12Z","updated_at":"2017-12-30T11:33:14Z","pushed_at":"2018-01-01T16:01:51Z","git_url":"git://github.com/andrenarchy/libfulltext.git","ssh_url":"git@github.com:andrenarchy/libfulltext.git","clone_url":"https://github.com/andrenarchy/libfulltext.git","svn_url":"https://github.com/andrenarchy/libfulltext","homepage":"","size":93,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":1,"open_issues":9,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/39"},"html":{"href":"https://github.com/andrenarchy/libfulltext/pull/39"},"issue":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/issues/39"},"comments":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/andrenarchy/libfulltext/statuses/d8e4e9c8760c4bd4a074caeccc5a693e0624c296"}},"author_association":"OWNER"}}
{"actor":{"display_login":"mfherbst"}}