{"action":"created","comment":{"url":"https://api.github.com/repos/inveniosoftware/dojson/pulls/comments/50978844","id":50978844,"diff_hunk":"@@ -0,0 +1,56 @@\n+# -*- coding: utf-8 -*-\n+#\n+# This file is part of DoJSON\n+# Copyright (C) 2016 CERN.\n+#\n+# DoJSON is free software; you can redistribute it and/or modify\n+# it under the terms of the Revised BSD License; see LICENSE file for\n+# more details.\n+\n+\"\"\"Test suite for DoJSON to_marc21.\"\"\"\n+\n+import os\n+\n+import pkg_resources\n+\n+import pytest\n+from click.testing import CliRunner\n+from dojson.contrib.marc21.utils import load\n+from dojson.contrib.to_marc21.utils import dumps\n+from test_core import RECORD_SIMPLE\n+\n+\n+def test_xslt_not_found():\n+    \"\"\"Test xslt not found.\"\"\"\n+    runner = CliRunner()\n+    with runner.isolated_filesystem():\n+        with open('record.xml', 'wb') as f:\n+            f.write(RECORD_SIMPLE.encode('utf-8'))\n+        data = list(load('record.xml'))\n+        pytest.raises(IOError, dumps, data, xslt_filename='file_not_exist')\n+\n+\n+def test_xslt_dump():\n+    \"\"\"Test xslt dump.\"\"\"\n+    path = os.path.dirname(__file__)\n+    with open(\"{}/demo_marc21_to_dc.converted.xml\".format(path)) as myfile:","path":"tests/test_contrib_to_marc21_utils.py","position":36,"original_position":36,"commit_id":"334eca602c0b893d6d8238c9a9695b38df726257","original_commit_id":"334eca602c0b893d6d8238c9a9695b38df726257","user":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"body":"please use `{0}` instead of `{}`","created_at":"2016-01-27T12:49:58Z","updated_at":"2016-01-27T12:49:58Z","html_url":"https://github.com/inveniosoftware/dojson/pull/67#discussion_r50978844","pull_request_url":"https://api.github.com/repos/inveniosoftware/dojson/pulls/67","_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/dojson/pulls/comments/50978844"},"html":{"href":"https://github.com/inveniosoftware/dojson/pull/67#discussion_r50978844"},"pull_request":{"href":"https://api.github.com/repos/inveniosoftware/dojson/pulls/67"}}},"pull_request":{"url":"https://api.github.com/repos/inveniosoftware/dojson/pulls/67","id":56764674,"html_url":"https://github.com/inveniosoftware/dojson/pull/67","diff_url":"https://github.com/inveniosoftware/dojson/pull/67.diff","patch_url":"https://github.com/inveniosoftware/dojson/pull/67.patch","issue_url":"https://api.github.com/repos/inveniosoftware/dojson/issues/67","number":67,"state":"open","locked":false,"title":"to_marc21: xslt support addition","user":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Leonardo Rossi <leonardo.r@cern.ch>","created_at":"2016-01-21T15:31:15Z","updated_at":"2016-01-27T12:49:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"898d1d353daedd48e7679925d75282920e5f6721","assignee":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/inveniosoftware/dojson/milestones/13","html_url":"https://github.com/inveniosoftware/dojson/milestones/v1.1.0","labels_url":"https://api.github.com/repos/inveniosoftware/dojson/milestones/13/labels","id":1512469,"number":13,"title":"v1.1.0","description":null,"creator":{"login":"jirikuncar","id":189798,"avatar_url":"https://avatars.githubusercontent.com/u/189798?v=3","gravatar_id":"","url":"https://api.github.com/users/jirikuncar","html_url":"https://github.com/jirikuncar","followers_url":"https://api.github.com/users/jirikuncar/followers","following_url":"https://api.github.com/users/jirikuncar/following{/other_user}","gists_url":"https://api.github.com/users/jirikuncar/gists{/gist_id}","starred_url":"https://api.github.com/users/jirikuncar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jirikuncar/subscriptions","organizations_url":"https://api.github.com/users/jirikuncar/orgs","repos_url":"https://api.github.com/users/jirikuncar/repos","events_url":"https://api.github.com/users/jirikuncar/events{/privacy}","received_events_url":"https://api.github.com/users/jirikuncar/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":2,"state":"open","created_at":"2016-01-18T12:32:54Z","updated_at":"2016-01-26T16:59:09Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/inveniosoftware/dojson/pulls/67/commits","review_comments_url":"https://api.github.com/repos/inveniosoftware/dojson/pulls/67/comments","review_comment_url":"https://api.github.com/repos/inveniosoftware/dojson/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inveniosoftware/dojson/issues/67/comments","statuses_url":"https://api.github.com/repos/inveniosoftware/dojson/statuses/334eca602c0b893d6d8238c9a9695b38df726257","head":{"label":"hachreak:add_to_oai_pmh","ref":"add_to_oai_pmh","sha":"334eca602c0b893d6d8238c9a9695b38df726257","user":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"repo":{"id":50017523,"name":"dojson","full_name":"hachreak/dojson","owner":{"login":"hachreak","id":377047,"avatar_url":"https://avatars.githubusercontent.com/u/377047?v=3","gravatar_id":"","url":"https://api.github.com/users/hachreak","html_url":"https://github.com/hachreak","followers_url":"https://api.github.com/users/hachreak/followers","following_url":"https://api.github.com/users/hachreak/following{/other_user}","gists_url":"https://api.github.com/users/hachreak/gists{/gist_id}","starred_url":"https://api.github.com/users/hachreak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachreak/subscriptions","organizations_url":"https://api.github.com/users/hachreak/orgs","repos_url":"https://api.github.com/users/hachreak/repos","events_url":"https://api.github.com/users/hachreak/events{/privacy}","received_events_url":"https://api.github.com/users/hachreak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hachreak/dojson","description":"Simple pythonic JSON to JSON converter.","fork":true,"url":"https://api.github.com/repos/hachreak/dojson","forks_url":"https://api.github.com/repos/hachreak/dojson/forks","keys_url":"https://api.github.com/repos/hachreak/dojson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hachreak/dojson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hachreak/dojson/teams","hooks_url":"https://api.github.com/repos/hachreak/dojson/hooks","issue_events_url":"https://api.github.com/repos/hachreak/dojson/issues/events{/number}","events_url":"https://api.github.com/repos/hachreak/dojson/events","assignees_url":"https://api.github.com/repos/hachreak/dojson/assignees{/user}","branches_url":"https://api.github.com/repos/hachreak/dojson/branches{/branch}","tags_url":"https://api.github.com/repos/hachreak/dojson/tags","blobs_url":"https://api.github.com/repos/hachreak/dojson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hachreak/dojson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hachreak/dojson/git/refs{/sha}","trees_url":"https://api.github.com/repos/hachreak/dojson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hachreak/dojson/statuses/{sha}","languages_url":"https://api.github.com/repos/hachreak/dojson/languages","stargazers_url":"https://api.github.com/repos/hachreak/dojson/stargazers","contributors_url":"https://api.github.com/repos/hachreak/dojson/contributors","subscribers_url":"https://api.github.com/repos/hachreak/dojson/subscribers","subscription_url":"https://api.github.com/repos/hachreak/dojson/subscription","commits_url":"https://api.github.com/repos/hachreak/dojson/commits{/sha}","git_commits_url":"https://api.github.com/repos/hachreak/dojson/git/commits{/sha}","comments_url":"https://api.github.com/repos/hachreak/dojson/comments{/number}","issue_comment_url":"https://api.github.com/repos/hachreak/dojson/issues/comments{/number}","contents_url":"https://api.github.com/repos/hachreak/dojson/contents/{+path}","compare_url":"https://api.github.com/repos/hachreak/dojson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hachreak/dojson/merges","archive_url":"https://api.github.com/repos/hachreak/dojson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hachreak/dojson/downloads","issues_url":"https://api.github.com/repos/hachreak/dojson/issues{/number}","pulls_url":"https://api.github.com/repos/hachreak/dojson/pulls{/number}","milestones_url":"https://api.github.com/repos/hachreak/dojson/milestones{/number}","notifications_url":"https://api.github.com/repos/hachreak/dojson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hachreak/dojson/labels{/name}","releases_url":"https://api.github.com/repos/hachreak/dojson/releases{/id}","deployments_url":"https://api.github.com/repos/hachreak/dojson/deployments","created_at":"2016-01-20T08:57:30Z","updated_at":"2016-01-20T08:57:30Z","pushed_at":"2016-01-27T12:46:26Z","git_url":"git://github.com/hachreak/dojson.git","ssh_url":"git@github.com:hachreak/dojson.git","clone_url":"https://github.com/hachreak/dojson.git","svn_url":"https://github.com/hachreak/dojson","homepage":null,"size":317,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"inveniosoftware:master","ref":"master","sha":"729c896499fdd24ee6ecb7e59e7e1c5fad518e81","user":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":37219287,"name":"dojson","full_name":"inveniosoftware/dojson","owner":{"login":"inveniosoftware","id":1157480,"avatar_url":"https://avatars.githubusercontent.com/u/1157480?v=3","gravatar_id":"","url":"https://api.github.com/users/inveniosoftware","html_url":"https://github.com/inveniosoftware","followers_url":"https://api.github.com/users/inveniosoftware/followers","following_url":"https://api.github.com/users/inveniosoftware/following{/other_user}","gists_url":"https://api.github.com/users/inveniosoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/inveniosoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inveniosoftware/subscriptions","organizations_url":"https://api.github.com/users/inveniosoftware/orgs","repos_url":"https://api.github.com/users/inveniosoftware/repos","events_url":"https://api.github.com/users/inveniosoftware/events{/privacy}","received_events_url":"https://api.github.com/users/inveniosoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/inveniosoftware/dojson","description":"Simple pythonic JSON to JSON converter.","fork":false,"url":"https://api.github.com/repos/inveniosoftware/dojson","forks_url":"https://api.github.com/repos/inveniosoftware/dojson/forks","keys_url":"https://api.github.com/repos/inveniosoftware/dojson/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inveniosoftware/dojson/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inveniosoftware/dojson/teams","hooks_url":"https://api.github.com/repos/inveniosoftware/dojson/hooks","issue_events_url":"https://api.github.com/repos/inveniosoftware/dojson/issues/events{/number}","events_url":"https://api.github.com/repos/inveniosoftware/dojson/events","assignees_url":"https://api.github.com/repos/inveniosoftware/dojson/assignees{/user}","branches_url":"https://api.github.com/repos/inveniosoftware/dojson/branches{/branch}","tags_url":"https://api.github.com/repos/inveniosoftware/dojson/tags","blobs_url":"https://api.github.com/repos/inveniosoftware/dojson/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inveniosoftware/dojson/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inveniosoftware/dojson/git/refs{/sha}","trees_url":"https://api.github.com/repos/inveniosoftware/dojson/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inveniosoftware/dojson/statuses/{sha}","languages_url":"https://api.github.com/repos/inveniosoftware/dojson/languages","stargazers_url":"https://api.github.com/repos/inveniosoftware/dojson/stargazers","contributors_url":"https://api.github.com/repos/inveniosoftware/dojson/contributors","subscribers_url":"https://api.github.com/repos/inveniosoftware/dojson/subscribers","subscription_url":"https://api.github.com/repos/inveniosoftware/dojson/subscription","commits_url":"https://api.github.com/repos/inveniosoftware/dojson/commits{/sha}","git_commits_url":"https://api.github.com/repos/inveniosoftware/dojson/git/commits{/sha}","comments_url":"https://api.github.com/repos/inveniosoftware/dojson/comments{/number}","issue_comment_url":"https://api.github.com/repos/inveniosoftware/dojson/issues/comments{/number}","contents_url":"https://api.github.com/repos/inveniosoftware/dojson/contents/{+path}","compare_url":"https://api.github.com/repos/inveniosoftware/dojson/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inveniosoftware/dojson/merges","archive_url":"https://api.github.com/repos/inveniosoftware/dojson/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inveniosoftware/dojson/downloads","issues_url":"https://api.github.com/repos/inveniosoftware/dojson/issues{/number}","pulls_url":"https://api.github.com/repos/inveniosoftware/dojson/pulls{/number}","milestones_url":"https://api.github.com/repos/inveniosoftware/dojson/milestones{/number}","notifications_url":"https://api.github.com/repos/inveniosoftware/dojson/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inveniosoftware/dojson/labels{/name}","releases_url":"https://api.github.com/repos/inveniosoftware/dojson/releases{/id}","deployments_url":"https://api.github.com/repos/inveniosoftware/dojson/deployments","created_at":"2015-06-10T19:54:15Z","updated_at":"2016-01-14T16:11:20Z","pushed_at":"2016-01-27T12:46:26Z","git_url":"git://github.com/inveniosoftware/dojson.git","ssh_url":"git@github.com:inveniosoftware/dojson.git","clone_url":"https://github.com/inveniosoftware/dojson.git","svn_url":"https://github.com/inveniosoftware/dojson","homepage":null,"size":456,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":11,"forks":13,"open_issues":11,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inveniosoftware/dojson/pulls/67"},"html":{"href":"https://github.com/inveniosoftware/dojson/pull/67"},"issue":{"href":"https://api.github.com/repos/inveniosoftware/dojson/issues/67"},"comments":{"href":"https://api.github.com/repos/inveniosoftware/dojson/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/inveniosoftware/dojson/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/inveniosoftware/dojson/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inveniosoftware/dojson/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/inveniosoftware/dojson/statuses/334eca602c0b893d6d8238c9a9695b38df726257"}}}}