{"action":"created","comment":{"url":"https://api.github.com/repos/xethorn/garcon/pulls/comments/23055229","id":23055229,"diff_hunk":"@@ -0,0 +1,43 @@\n+import pytest\n+\n+from garcon import log\n+\n+class MockLogClient(log.GarconLogger):\n+    \"\"\"Mock of an object for which we want to add a Garcon logger\n+    \"\"\"\n+    domain = 'test_domain'\n+\n+\n+\"\"\"Valid execution context\n+\"\"\"\n+execution_context = {\n+    'execution.domain': 'dev',\n+    'execution.run_id': '123abc=',\n+    'execution.workflow_id': 'test-workflow-id'}\n+\n+\"\"\"Invalid execution context. Keys are incorrect\n+\"\"\"\n+invalid_execution_context = {\n+    'abcd.domain': 'dev',\n+    '123.run_id': '123abc=',\n+    'XYZ.workflow_id': 'test-workflow-id'}\n+\n+\n+def log_enabled_object():\n+    \"\"\"Creates a mock object with log enabled\n+    \"\"\"\n+\n+    mock = MockLogClient()\n+    mock.set_log(execution_context)\n+\n+    return mock\n+\n+\n+def log_disabled_object():\n+    \"\"\"Creates a mock object with no log\n+    \"\"\"\n+\n+    mock = MockLogClient()\n+    mock.set_log(invalid_execution_context)\n+\n+    return mock","path":"tests/fixtures/log.py","position":43,"original_position":43,"commit_id":"770129c0c49d4d5ee663b0f5811daf854b06746b","original_commit_id":"770129c0c49d4d5ee663b0f5811daf854b06746b","user":{"login":"xethorn","id":1835927,"avatar_url":"https://avatars.githubusercontent.com/u/1835927?v=3","gravatar_id":"","url":"https://api.github.com/users/xethorn","html_url":"https://github.com/xethorn","followers_url":"https://api.github.com/users/xethorn/followers","following_url":"https://api.github.com/users/xethorn/following{/other_user}","gists_url":"https://api.github.com/users/xethorn/gists{/gist_id}","starred_url":"https://api.github.com/users/xethorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xethorn/subscriptions","organizations_url":"https://api.github.com/users/xethorn/orgs","repos_url":"https://api.github.com/users/xethorn/repos","events_url":"https://api.github.com/users/xethorn/events{/privacy}","received_events_url":"https://api.github.com/users/xethorn/received_events","type":"User","site_admin":false},"body":"Don't forget to add new lines at the end of the file","created_at":"2015-01-16T00:15:34Z","updated_at":"2015-01-16T00:15:34Z","html_url":"https://github.com/xethorn/garcon/pull/17#discussion_r23055229","pull_request_url":"https://api.github.com/repos/xethorn/garcon/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/xethorn/garcon/pulls/comments/23055229"},"html":{"href":"https://github.com/xethorn/garcon/pull/17#discussion_r23055229"},"pull_request":{"href":"https://api.github.com/repos/xethorn/garcon/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/xethorn/garcon/pulls/17","id":27474004,"html_url":"https://github.com/xethorn/garcon/pull/17","diff_url":"https://github.com/xethorn/garcon/pull/17.diff","patch_url":"https://github.com/xethorn/garcon/pull/17.patch","issue_url":"https://api.github.com/repos/xethorn/garcon/issues/17","number":17,"state":"open","locked":false,"title":"Added logging capabilities from the Activity object. You can now log fro...","user":{"login":"rantonmattei","id":1832073,"avatar_url":"https://avatars.githubusercontent.com/u/1832073?v=3","gravatar_id":"","url":"https://api.github.com/users/rantonmattei","html_url":"https://github.com/rantonmattei","followers_url":"https://api.github.com/users/rantonmattei/followers","following_url":"https://api.github.com/users/rantonmattei/following{/other_user}","gists_url":"https://api.github.com/users/rantonmattei/gists{/gist_id}","starred_url":"https://api.github.com/users/rantonmattei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantonmattei/subscriptions","organizations_url":"https://api.github.com/users/rantonmattei/orgs","repos_url":"https://api.github.com/users/rantonmattei/repos","events_url":"https://api.github.com/users/rantonmattei/events{/privacy}","received_events_url":"https://api.github.com/users/rantonmattei/received_events","type":"User","site_admin":false},"body":"...m a task using the activity object passed in\r\n\r\n@mortaliorchard please review","created_at":"2015-01-16T00:01:58Z","updated_at":"2015-01-16T00:15:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc9a89b50cba09528fbfb950da952239917b348f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xethorn/garcon/pulls/17/commits","review_comments_url":"https://api.github.com/repos/xethorn/garcon/pulls/17/comments","review_comment_url":"https://api.github.com/repos/xethorn/garcon/pulls/comments/{number}","comments_url":"https://api.github.com/repos/xethorn/garcon/issues/17/comments","statuses_url":"https://api.github.com/repos/xethorn/garcon/statuses/770129c0c49d4d5ee663b0f5811daf854b06746b","head":{"label":"rantonmattei:garcon_logger","ref":"garcon_logger","sha":"770129c0c49d4d5ee663b0f5811daf854b06746b","user":{"login":"rantonmattei","id":1832073,"avatar_url":"https://avatars.githubusercontent.com/u/1832073?v=3","gravatar_id":"","url":"https://api.github.com/users/rantonmattei","html_url":"https://github.com/rantonmattei","followers_url":"https://api.github.com/users/rantonmattei/followers","following_url":"https://api.github.com/users/rantonmattei/following{/other_user}","gists_url":"https://api.github.com/users/rantonmattei/gists{/gist_id}","starred_url":"https://api.github.com/users/rantonmattei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantonmattei/subscriptions","organizations_url":"https://api.github.com/users/rantonmattei/orgs","repos_url":"https://api.github.com/users/rantonmattei/repos","events_url":"https://api.github.com/users/rantonmattei/events{/privacy}","received_events_url":"https://api.github.com/users/rantonmattei/received_events","type":"User","site_admin":false},"repo":{"id":29138665,"name":"garcon","full_name":"rantonmattei/garcon","owner":{"login":"rantonmattei","id":1832073,"avatar_url":"https://avatars.githubusercontent.com/u/1832073?v=3","gravatar_id":"","url":"https://api.github.com/users/rantonmattei","html_url":"https://github.com/rantonmattei","followers_url":"https://api.github.com/users/rantonmattei/followers","following_url":"https://api.github.com/users/rantonmattei/following{/other_user}","gists_url":"https://api.github.com/users/rantonmattei/gists{/gist_id}","starred_url":"https://api.github.com/users/rantonmattei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rantonmattei/subscriptions","organizations_url":"https://api.github.com/users/rantonmattei/orgs","repos_url":"https://api.github.com/users/rantonmattei/repos","events_url":"https://api.github.com/users/rantonmattei/events{/privacy}","received_events_url":"https://api.github.com/users/rantonmattei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rantonmattei/garcon","description":"Library for AWS SWF","fork":true,"url":"https://api.github.com/repos/rantonmattei/garcon","forks_url":"https://api.github.com/repos/rantonmattei/garcon/forks","keys_url":"https://api.github.com/repos/rantonmattei/garcon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rantonmattei/garcon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rantonmattei/garcon/teams","hooks_url":"https://api.github.com/repos/rantonmattei/garcon/hooks","issue_events_url":"https://api.github.com/repos/rantonmattei/garcon/issues/events{/number}","events_url":"https://api.github.com/repos/rantonmattei/garcon/events","assignees_url":"https://api.github.com/repos/rantonmattei/garcon/assignees{/user}","branches_url":"https://api.github.com/repos/rantonmattei/garcon/branches{/branch}","tags_url":"https://api.github.com/repos/rantonmattei/garcon/tags","blobs_url":"https://api.github.com/repos/rantonmattei/garcon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rantonmattei/garcon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rantonmattei/garcon/git/refs{/sha}","trees_url":"https://api.github.com/repos/rantonmattei/garcon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rantonmattei/garcon/statuses/{sha}","languages_url":"https://api.github.com/repos/rantonmattei/garcon/languages","stargazers_url":"https://api.github.com/repos/rantonmattei/garcon/stargazers","contributors_url":"https://api.github.com/repos/rantonmattei/garcon/contributors","subscribers_url":"https://api.github.com/repos/rantonmattei/garcon/subscribers","subscription_url":"https://api.github.com/repos/rantonmattei/garcon/subscription","commits_url":"https://api.github.com/repos/rantonmattei/garcon/commits{/sha}","git_commits_url":"https://api.github.com/repos/rantonmattei/garcon/git/commits{/sha}","comments_url":"https://api.github.com/repos/rantonmattei/garcon/comments{/number}","issue_comment_url":"https://api.github.com/repos/rantonmattei/garcon/issues/comments/{number}","contents_url":"https://api.github.com/repos/rantonmattei/garcon/contents/{+path}","compare_url":"https://api.github.com/repos/rantonmattei/garcon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rantonmattei/garcon/merges","archive_url":"https://api.github.com/repos/rantonmattei/garcon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rantonmattei/garcon/downloads","issues_url":"https://api.github.com/repos/rantonmattei/garcon/issues{/number}","pulls_url":"https://api.github.com/repos/rantonmattei/garcon/pulls{/number}","milestones_url":"https://api.github.com/repos/rantonmattei/garcon/milestones{/number}","notifications_url":"https://api.github.com/repos/rantonmattei/garcon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rantonmattei/garcon/labels{/name}","releases_url":"https://api.github.com/repos/rantonmattei/garcon/releases{/id}","created_at":"2015-01-12T14:17:16Z","updated_at":"2015-01-12T14:17:17Z","pushed_at":"2015-01-16T00:01:26Z","git_url":"git://github.com/rantonmattei/garcon.git","ssh_url":"git@github.com:rantonmattei/garcon.git","clone_url":"https://github.com/rantonmattei/garcon.git","svn_url":"https://github.com/rantonmattei/garcon","homepage":null,"size":112,"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":"xethorn:master","ref":"master","sha":"e9ffa84f157fbfcd455ad4e0c44f941d1c21c412","user":{"login":"xethorn","id":1835927,"avatar_url":"https://avatars.githubusercontent.com/u/1835927?v=3","gravatar_id":"","url":"https://api.github.com/users/xethorn","html_url":"https://github.com/xethorn","followers_url":"https://api.github.com/users/xethorn/followers","following_url":"https://api.github.com/users/xethorn/following{/other_user}","gists_url":"https://api.github.com/users/xethorn/gists{/gist_id}","starred_url":"https://api.github.com/users/xethorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xethorn/subscriptions","organizations_url":"https://api.github.com/users/xethorn/orgs","repos_url":"https://api.github.com/users/xethorn/repos","events_url":"https://api.github.com/users/xethorn/events{/privacy}","received_events_url":"https://api.github.com/users/xethorn/received_events","type":"User","site_admin":false},"repo":{"id":28343159,"name":"garcon","full_name":"xethorn/garcon","owner":{"login":"xethorn","id":1835927,"avatar_url":"https://avatars.githubusercontent.com/u/1835927?v=3","gravatar_id":"","url":"https://api.github.com/users/xethorn","html_url":"https://github.com/xethorn","followers_url":"https://api.github.com/users/xethorn/followers","following_url":"https://api.github.com/users/xethorn/following{/other_user}","gists_url":"https://api.github.com/users/xethorn/gists{/gist_id}","starred_url":"https://api.github.com/users/xethorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xethorn/subscriptions","organizations_url":"https://api.github.com/users/xethorn/orgs","repos_url":"https://api.github.com/users/xethorn/repos","events_url":"https://api.github.com/users/xethorn/events{/privacy}","received_events_url":"https://api.github.com/users/xethorn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xethorn/garcon","description":"Library for AWS SWF","fork":false,"url":"https://api.github.com/repos/xethorn/garcon","forks_url":"https://api.github.com/repos/xethorn/garcon/forks","keys_url":"https://api.github.com/repos/xethorn/garcon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xethorn/garcon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xethorn/garcon/teams","hooks_url":"https://api.github.com/repos/xethorn/garcon/hooks","issue_events_url":"https://api.github.com/repos/xethorn/garcon/issues/events{/number}","events_url":"https://api.github.com/repos/xethorn/garcon/events","assignees_url":"https://api.github.com/repos/xethorn/garcon/assignees{/user}","branches_url":"https://api.github.com/repos/xethorn/garcon/branches{/branch}","tags_url":"https://api.github.com/repos/xethorn/garcon/tags","blobs_url":"https://api.github.com/repos/xethorn/garcon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xethorn/garcon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xethorn/garcon/git/refs{/sha}","trees_url":"https://api.github.com/repos/xethorn/garcon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xethorn/garcon/statuses/{sha}","languages_url":"https://api.github.com/repos/xethorn/garcon/languages","stargazers_url":"https://api.github.com/repos/xethorn/garcon/stargazers","contributors_url":"https://api.github.com/repos/xethorn/garcon/contributors","subscribers_url":"https://api.github.com/repos/xethorn/garcon/subscribers","subscription_url":"https://api.github.com/repos/xethorn/garcon/subscription","commits_url":"https://api.github.com/repos/xethorn/garcon/commits{/sha}","git_commits_url":"https://api.github.com/repos/xethorn/garcon/git/commits{/sha}","comments_url":"https://api.github.com/repos/xethorn/garcon/comments{/number}","issue_comment_url":"https://api.github.com/repos/xethorn/garcon/issues/comments/{number}","contents_url":"https://api.github.com/repos/xethorn/garcon/contents/{+path}","compare_url":"https://api.github.com/repos/xethorn/garcon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xethorn/garcon/merges","archive_url":"https://api.github.com/repos/xethorn/garcon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xethorn/garcon/downloads","issues_url":"https://api.github.com/repos/xethorn/garcon/issues{/number}","pulls_url":"https://api.github.com/repos/xethorn/garcon/pulls{/number}","milestones_url":"https://api.github.com/repos/xethorn/garcon/milestones{/number}","notifications_url":"https://api.github.com/repos/xethorn/garcon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xethorn/garcon/labels{/name}","releases_url":"https://api.github.com/repos/xethorn/garcon/releases{/id}","created_at":"2014-12-22T15:06:14Z","updated_at":"2015-01-15T03:35:24Z","pushed_at":"2015-01-14T21:44:34Z","git_url":"git://github.com/xethorn/garcon.git","ssh_url":"git@github.com:xethorn/garcon.git","clone_url":"https://github.com/xethorn/garcon.git","svn_url":"https://github.com/xethorn/garcon","homepage":null,"size":396,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/xethorn/garcon/pulls/17"},"html":{"href":"https://github.com/xethorn/garcon/pull/17"},"issue":{"href":"https://api.github.com/repos/xethorn/garcon/issues/17"},"comments":{"href":"https://api.github.com/repos/xethorn/garcon/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/xethorn/garcon/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/xethorn/garcon/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/xethorn/garcon/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/xethorn/garcon/statuses/770129c0c49d4d5ee663b0f5811daf854b06746b"}}}}