{"action":"created","comment":{"url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/comments/41568241","id":41568241,"diff_hunk":"@@ -0,0 +1,801 @@\n+import json\n+\n+from lxml import objectify\n+import pytest\n+\n+from django.core.urlresolvers import reverse\n+from django.http import Http404\n+from django.utils import timezone\n+\n+from premis_event_service import views, models\n+from . import factories, AppEventTestXml\n+\n+\n+pytestmark = [\n+    pytest.mark.urls('premis_event_service.urls'),\n+    pytest.mark.django_db,\n+]\n+\n+\n+def test_app_returns_ok(rf):\n+    request = rf.get('/')\n+    response = views.app(request)\n+    assert response.status_code == 200\n+\n+\n+def test_app_response_content_type(rf):\n+    request = rf.get('/')\n+    response = views.app(request)\n+    assert response.get('Content-Type') == 'application/atom+xml'\n+\n+\n+def test_humanEvent_raises_http404(rf):\n+    \"\"\"An Http404 should be raised when the view is unable to locate\n+    an Event.\n+    \"\"\"\n+    request = rf.get('/')\n+    with pytest.raises(Http404):\n+        views.humanEvent(request)\n+\n+\n+def test_humanEvent_returns_ok(rf):\n+    event = factories.EventFactory.create()\n+    request = rf.get('/')\n+    response = views.humanEvent(request, event.event_identifier)\n+    assert response.status_code == 200\n+\n+\n+def test_humanAgent_returns_ok(rf):","path":"tests/test_views.py","position":48,"original_position":48,"commit_id":"1b1815f9359bc304d3da93d2ea62474084423d06","original_commit_id":"1b1815f9359bc304d3da93d2ea62474084423d06","user":{"login":"ldko","id":6740390,"avatar_url":"https://avatars.githubusercontent.com/u/6740390?v=3","gravatar_id":"","url":"https://api.github.com/users/ldko","html_url":"https://github.com/ldko","followers_url":"https://api.github.com/users/ldko/followers","following_url":"https://api.github.com/users/ldko/following{/other_user}","gists_url":"https://api.github.com/users/ldko/gists{/gist_id}","starred_url":"https://api.github.com/users/ldko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldko/subscriptions","organizations_url":"https://api.github.com/users/ldko/orgs","repos_url":"https://api.github.com/users/ldko/repos","events_url":"https://api.github.com/users/ldko/events{/privacy}","received_events_url":"https://api.github.com/users/ldko/received_events","type":"User","site_admin":false},"body":"test_humanAgent_returns_ok test is same as test_humanEvent_returns_ok test.","created_at":"2015-10-08T21:00:18Z","updated_at":"2015-10-08T21:00:18Z","html_url":"https://github.com/unt-libraries/django-premis-event-service/pull/16#discussion_r41568241","pull_request_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/comments/41568241"},"html":{"href":"https://github.com/unt-libraries/django-premis-event-service/pull/16#discussion_r41568241"},"pull_request":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/16","id":46961564,"html_url":"https://github.com/unt-libraries/django-premis-event-service/pull/16","diff_url":"https://github.com/unt-libraries/django-premis-event-service/pull/16.diff","patch_url":"https://github.com/unt-libraries/django-premis-event-service/pull/16.patch","issue_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues/16","number":16,"state":"open","locked":false,"title":"Views Tests","user":{"login":"damonkelley","id":4121849,"avatar_url":"https://avatars.githubusercontent.com/u/4121849?v=3","gravatar_id":"","url":"https://api.github.com/users/damonkelley","html_url":"https://github.com/damonkelley","followers_url":"https://api.github.com/users/damonkelley/followers","following_url":"https://api.github.com/users/damonkelley/following{/other_user}","gists_url":"https://api.github.com/users/damonkelley/gists{/gist_id}","starred_url":"https://api.github.com/users/damonkelley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damonkelley/subscriptions","organizations_url":"https://api.github.com/users/damonkelley/orgs","repos_url":"https://api.github.com/users/damonkelley/repos","events_url":"https://api.github.com/users/damonkelley/events{/privacy}","received_events_url":"https://api.github.com/users/damonkelley/received_events","type":"User","site_admin":false},"body":"Fixes #17","created_at":"2015-10-06T21:39:45Z","updated_at":"2015-10-08T21:00:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c963ee2e7ea07d716524d2a0d67f6b1b4c7c1d60","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/16/commits","review_comments_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/16/comments","review_comment_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues/16/comments","statuses_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/statuses/1b1815f9359bc304d3da93d2ea62474084423d06","head":{"label":"unt-libraries:views-tests","ref":"views-tests","sha":"1b1815f9359bc304d3da93d2ea62474084423d06","user":{"login":"unt-libraries","id":6526233,"avatar_url":"https://avatars.githubusercontent.com/u/6526233?v=3","gravatar_id":"","url":"https://api.github.com/users/unt-libraries","html_url":"https://github.com/unt-libraries","followers_url":"https://api.github.com/users/unt-libraries/followers","following_url":"https://api.github.com/users/unt-libraries/following{/other_user}","gists_url":"https://api.github.com/users/unt-libraries/gists{/gist_id}","starred_url":"https://api.github.com/users/unt-libraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unt-libraries/subscriptions","organizations_url":"https://api.github.com/users/unt-libraries/orgs","repos_url":"https://api.github.com/users/unt-libraries/repos","events_url":"https://api.github.com/users/unt-libraries/events{/privacy}","received_events_url":"https://api.github.com/users/unt-libraries/received_events","type":"Organization","site_admin":false},"repo":{"id":16565361,"name":"django-premis-event-service","full_name":"unt-libraries/django-premis-event-service","owner":{"login":"unt-libraries","id":6526233,"avatar_url":"https://avatars.githubusercontent.com/u/6526233?v=3","gravatar_id":"","url":"https://api.github.com/users/unt-libraries","html_url":"https://github.com/unt-libraries","followers_url":"https://api.github.com/users/unt-libraries/followers","following_url":"https://api.github.com/users/unt-libraries/following{/other_user}","gists_url":"https://api.github.com/users/unt-libraries/gists{/gist_id}","starred_url":"https://api.github.com/users/unt-libraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unt-libraries/subscriptions","organizations_url":"https://api.github.com/users/unt-libraries/orgs","repos_url":"https://api.github.com/users/unt-libraries/repos","events_url":"https://api.github.com/users/unt-libraries/events{/privacy}","received_events_url":"https://api.github.com/users/unt-libraries/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unt-libraries/django-premis-event-service","description":"Django app for managing PREMIS Events","fork":false,"url":"https://api.github.com/repos/unt-libraries/django-premis-event-service","forks_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/forks","keys_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/teams","hooks_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/hooks","issue_events_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues/events{/number}","events_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/events","assignees_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/assignees{/user}","branches_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/branches{/branch}","tags_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/tags","blobs_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/statuses/{sha}","languages_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/languages","stargazers_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/stargazers","contributors_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/contributors","subscribers_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/subscribers","subscription_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/subscription","commits_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/contents/{+path}","compare_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/merges","archive_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/downloads","issues_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues{/number}","pulls_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls{/number}","milestones_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/milestones{/number}","notifications_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/labels{/name}","releases_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/releases{/id}","created_at":"2014-02-06T01:44:22Z","updated_at":"2015-09-18T15:58:42Z","pushed_at":"2015-10-08T18:50:33Z","git_url":"git://github.com/unt-libraries/django-premis-event-service.git","ssh_url":"git@github.com:unt-libraries/django-premis-event-service.git","clone_url":"https://github.com/unt-libraries/django-premis-event-service.git","svn_url":"https://github.com/unt-libraries/django-premis-event-service","homepage":"http://premis-event-service.readthedocs.org/","size":458,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":19,"forks":3,"open_issues":19,"watchers":4,"default_branch":"master"}},"base":{"label":"unt-libraries:master","ref":"master","sha":"c4328ca2fc61f2cc154fd190ae63a5fc13bed703","user":{"login":"unt-libraries","id":6526233,"avatar_url":"https://avatars.githubusercontent.com/u/6526233?v=3","gravatar_id":"","url":"https://api.github.com/users/unt-libraries","html_url":"https://github.com/unt-libraries","followers_url":"https://api.github.com/users/unt-libraries/followers","following_url":"https://api.github.com/users/unt-libraries/following{/other_user}","gists_url":"https://api.github.com/users/unt-libraries/gists{/gist_id}","starred_url":"https://api.github.com/users/unt-libraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unt-libraries/subscriptions","organizations_url":"https://api.github.com/users/unt-libraries/orgs","repos_url":"https://api.github.com/users/unt-libraries/repos","events_url":"https://api.github.com/users/unt-libraries/events{/privacy}","received_events_url":"https://api.github.com/users/unt-libraries/received_events","type":"Organization","site_admin":false},"repo":{"id":16565361,"name":"django-premis-event-service","full_name":"unt-libraries/django-premis-event-service","owner":{"login":"unt-libraries","id":6526233,"avatar_url":"https://avatars.githubusercontent.com/u/6526233?v=3","gravatar_id":"","url":"https://api.github.com/users/unt-libraries","html_url":"https://github.com/unt-libraries","followers_url":"https://api.github.com/users/unt-libraries/followers","following_url":"https://api.github.com/users/unt-libraries/following{/other_user}","gists_url":"https://api.github.com/users/unt-libraries/gists{/gist_id}","starred_url":"https://api.github.com/users/unt-libraries/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unt-libraries/subscriptions","organizations_url":"https://api.github.com/users/unt-libraries/orgs","repos_url":"https://api.github.com/users/unt-libraries/repos","events_url":"https://api.github.com/users/unt-libraries/events{/privacy}","received_events_url":"https://api.github.com/users/unt-libraries/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unt-libraries/django-premis-event-service","description":"Django app for managing PREMIS Events","fork":false,"url":"https://api.github.com/repos/unt-libraries/django-premis-event-service","forks_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/forks","keys_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/teams","hooks_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/hooks","issue_events_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues/events{/number}","events_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/events","assignees_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/assignees{/user}","branches_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/branches{/branch}","tags_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/tags","blobs_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/statuses/{sha}","languages_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/languages","stargazers_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/stargazers","contributors_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/contributors","subscribers_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/subscribers","subscription_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/subscription","commits_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/contents/{+path}","compare_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/merges","archive_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/downloads","issues_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues{/number}","pulls_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls{/number}","milestones_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/milestones{/number}","notifications_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/labels{/name}","releases_url":"https://api.github.com/repos/unt-libraries/django-premis-event-service/releases{/id}","created_at":"2014-02-06T01:44:22Z","updated_at":"2015-09-18T15:58:42Z","pushed_at":"2015-10-08T18:50:33Z","git_url":"git://github.com/unt-libraries/django-premis-event-service.git","ssh_url":"git@github.com:unt-libraries/django-premis-event-service.git","clone_url":"https://github.com/unt-libraries/django-premis-event-service.git","svn_url":"https://github.com/unt-libraries/django-premis-event-service","homepage":"http://premis-event-service.readthedocs.org/","size":458,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":19,"forks":3,"open_issues":19,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/16"},"html":{"href":"https://github.com/unt-libraries/django-premis-event-service/pull/16"},"issue":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues/16"},"comments":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/unt-libraries/django-premis-event-service/statuses/1b1815f9359bc304d3da93d2ea62474084423d06"}}}}