{"action":"created","comment":{"url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/comments/54963138","id":54963138,"diff_hunk":"@@ -0,0 +1,43 @@\n+from remotespark.utils.sparkevents import SparkEvents\n+import remotespark.utils.constants as constants\n+from remotespark.utils import utils\n+from nose.tools import with_setup\n+from mock import MagicMock\n+\n+def _setup():\n+    global spark_events, guid\n+\n+    spark_events = SparkEvents()\n+    spark_events.handler = MagicMock()\n+    SparkEvents.get_utc_date_time = MagicMock()\n+    guid = utils.generate_uuid()\n+\n+def _teardown():\n+    pass\n+\n+@with_setup(_setup, _teardown)\n+def test_emit_session_creation_start_event():\n+\n+    language = constants.SESSION_KIND_SPARK\n+    event_name = constants.SESSION_CREATION_START_EVENT\n+\n+    kwargs_list = [(\"TimeStamp\", spark_events.get_utc_date_time()), (\"EventName\", event_name), (\"SessionGuid\", guid),\n+                (\"SparkLanguage\", language)]\n+\n+    spark_events.emit_session_creation_start_event(guid, language)\n+    spark_events.get_utc_date_time.assrt_called_once_with()","path":"tests/test_sparkevents.py","position":28,"original_position":28,"commit_id":"11929140f47c45188e70902ec41d8c6d79d4e5e2","original_commit_id":"11929140f47c45188e70902ec41d8c6d79d4e5e2","user":{"login":"aggFTW","id":654204,"avatar_url":"https://avatars.githubusercontent.com/u/654204?v=3","gravatar_id":"","url":"https://api.github.com/users/aggFTW","html_url":"https://github.com/aggFTW","followers_url":"https://api.github.com/users/aggFTW/followers","following_url":"https://api.github.com/users/aggFTW/following{/other_user}","gists_url":"https://api.github.com/users/aggFTW/gists{/gist_id}","starred_url":"https://api.github.com/users/aggFTW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aggFTW/subscriptions","organizations_url":"https://api.github.com/users/aggFTW/orgs","repos_url":"https://api.github.com/users/aggFTW/repos","events_url":"https://api.github.com/users/aggFTW/events{/privacy}","received_events_url":"https://api.github.com/users/aggFTW/received_events","type":"User","site_admin":false},"body":"Typo in assert.","created_at":"2016-03-03T22:55:45Z","updated_at":"2016-03-03T22:55:45Z","html_url":"https://github.com/jupyter-incubator/sparkmagic/pull/175#discussion_r54963138","pull_request_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/175","_links":{"self":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/comments/54963138"},"html":{"href":"https://github.com/jupyter-incubator/sparkmagic/pull/175#discussion_r54963138"},"pull_request":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/175"}}},"pull_request":{"url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/175","id":61130822,"html_url":"https://github.com/jupyter-incubator/sparkmagic/pull/175","diff_url":"https://github.com/jupyter-incubator/sparkmagic/pull/175.diff","patch_url":"https://github.com/jupyter-incubator/sparkmagic/pull/175.patch","issue_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/issues/175","number":175,"state":"open","locked":false,"title":"Adding a skeleton for storing Spark Magic events to MDS","user":{"login":"MohamedElKamhawy","id":16245294,"avatar_url":"https://avatars.githubusercontent.com/u/16245294?v=3","gravatar_id":"","url":"https://api.github.com/users/MohamedElKamhawy","html_url":"https://github.com/MohamedElKamhawy","followers_url":"https://api.github.com/users/MohamedElKamhawy/followers","following_url":"https://api.github.com/users/MohamedElKamhawy/following{/other_user}","gists_url":"https://api.github.com/users/MohamedElKamhawy/gists{/gist_id}","starred_url":"https://api.github.com/users/MohamedElKamhawy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MohamedElKamhawy/subscriptions","organizations_url":"https://api.github.com/users/MohamedElKamhawy/orgs","repos_url":"https://api.github.com/users/MohamedElKamhawy/repos","events_url":"https://api.github.com/users/MohamedElKamhawy/events{/privacy}","received_events_url":"https://api.github.com/users/MohamedElKamhawy/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-29T19:31:37Z","updated_at":"2016-03-03T22:55:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"225fb26686ae536506a2b0bbf4c508e82f6a520e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/175/commits","review_comments_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/175/comments","review_comment_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/issues/175/comments","statuses_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/statuses/11929140f47c45188e70902ec41d8c6d79d4e5e2","head":{"label":"MohamedElKamhawy:mek","ref":"mek","sha":"11929140f47c45188e70902ec41d8c6d79d4e5e2","user":{"login":"MohamedElKamhawy","id":16245294,"avatar_url":"https://avatars.githubusercontent.com/u/16245294?v=3","gravatar_id":"","url":"https://api.github.com/users/MohamedElKamhawy","html_url":"https://github.com/MohamedElKamhawy","followers_url":"https://api.github.com/users/MohamedElKamhawy/followers","following_url":"https://api.github.com/users/MohamedElKamhawy/following{/other_user}","gists_url":"https://api.github.com/users/MohamedElKamhawy/gists{/gist_id}","starred_url":"https://api.github.com/users/MohamedElKamhawy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MohamedElKamhawy/subscriptions","organizations_url":"https://api.github.com/users/MohamedElKamhawy/orgs","repos_url":"https://api.github.com/users/MohamedElKamhawy/repos","events_url":"https://api.github.com/users/MohamedElKamhawy/events{/privacy}","received_events_url":"https://api.github.com/users/MohamedElKamhawy/received_events","type":"User","site_admin":false},"repo":{"id":48130871,"name":"sparkmagic","full_name":"MohamedElKamhawy/sparkmagic","owner":{"login":"MohamedElKamhawy","id":16245294,"avatar_url":"https://avatars.githubusercontent.com/u/16245294?v=3","gravatar_id":"","url":"https://api.github.com/users/MohamedElKamhawy","html_url":"https://github.com/MohamedElKamhawy","followers_url":"https://api.github.com/users/MohamedElKamhawy/followers","following_url":"https://api.github.com/users/MohamedElKamhawy/following{/other_user}","gists_url":"https://api.github.com/users/MohamedElKamhawy/gists{/gist_id}","starred_url":"https://api.github.com/users/MohamedElKamhawy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MohamedElKamhawy/subscriptions","organizations_url":"https://api.github.com/users/MohamedElKamhawy/orgs","repos_url":"https://api.github.com/users/MohamedElKamhawy/repos","events_url":"https://api.github.com/users/MohamedElKamhawy/events{/privacy}","received_events_url":"https://api.github.com/users/MohamedElKamhawy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MohamedElKamhawy/sparkmagic","description":"IPython magics for working with remote Spark clusters","fork":true,"url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic","forks_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/forks","keys_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/teams","hooks_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/hooks","issue_events_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/issues/events{/number}","events_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/events","assignees_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/assignees{/user}","branches_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/branches{/branch}","tags_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/tags","blobs_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/git/refs{/sha}","trees_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/statuses/{sha}","languages_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/languages","stargazers_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/stargazers","contributors_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/contributors","subscribers_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/subscribers","subscription_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/subscription","commits_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/commits{/sha}","git_commits_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/git/commits{/sha}","comments_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/comments{/number}","issue_comment_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/issues/comments{/number}","contents_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/contents/{+path}","compare_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/merges","archive_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/downloads","issues_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/issues{/number}","pulls_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/pulls{/number}","milestones_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/milestones{/number}","notifications_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/labels{/name}","releases_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/releases{/id}","deployments_url":"https://api.github.com/repos/MohamedElKamhawy/sparkmagic/deployments","created_at":"2015-12-16T19:35:10Z","updated_at":"2016-01-13T22:40:12Z","pushed_at":"2016-03-03T22:30:19Z","git_url":"git://github.com/MohamedElKamhawy/sparkmagic.git","ssh_url":"git@github.com:MohamedElKamhawy/sparkmagic.git","clone_url":"https://github.com/MohamedElKamhawy/sparkmagic.git","svn_url":"https://github.com/MohamedElKamhawy/sparkmagic","homepage":null,"size":546,"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":"jupyter-incubator:master","ref":"master","sha":"164da9388aa31aa5f112042bdfd1d2720d1c0a85","user":{"login":"jupyter-incubator","id":14002361,"avatar_url":"https://avatars.githubusercontent.com/u/14002361?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter-incubator","html_url":"https://github.com/jupyter-incubator","followers_url":"https://api.github.com/users/jupyter-incubator/followers","following_url":"https://api.github.com/users/jupyter-incubator/following{/other_user}","gists_url":"https://api.github.com/users/jupyter-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter-incubator/subscriptions","organizations_url":"https://api.github.com/users/jupyter-incubator/orgs","repos_url":"https://api.github.com/users/jupyter-incubator/repos","events_url":"https://api.github.com/users/jupyter-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter-incubator/received_events","type":"Organization","site_admin":false},"repo":{"id":42875585,"name":"sparkmagic","full_name":"jupyter-incubator/sparkmagic","owner":{"login":"jupyter-incubator","id":14002361,"avatar_url":"https://avatars.githubusercontent.com/u/14002361?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter-incubator","html_url":"https://github.com/jupyter-incubator","followers_url":"https://api.github.com/users/jupyter-incubator/followers","following_url":"https://api.github.com/users/jupyter-incubator/following{/other_user}","gists_url":"https://api.github.com/users/jupyter-incubator/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter-incubator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter-incubator/subscriptions","organizations_url":"https://api.github.com/users/jupyter-incubator/orgs","repos_url":"https://api.github.com/users/jupyter-incubator/repos","events_url":"https://api.github.com/users/jupyter-incubator/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter-incubator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jupyter-incubator/sparkmagic","description":"IPython magics for working with remote Spark clusters","fork":false,"url":"https://api.github.com/repos/jupyter-incubator/sparkmagic","forks_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/forks","keys_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/teams","hooks_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/hooks","issue_events_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/issues/events{/number}","events_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/events","assignees_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/assignees{/user}","branches_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/branches{/branch}","tags_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/tags","blobs_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/git/refs{/sha}","trees_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/statuses/{sha}","languages_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/languages","stargazers_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/stargazers","contributors_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/contributors","subscribers_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/subscribers","subscription_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/subscription","commits_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/commits{/sha}","git_commits_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/git/commits{/sha}","comments_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/comments{/number}","issue_comment_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/issues/comments{/number}","contents_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/contents/{+path}","compare_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/merges","archive_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/downloads","issues_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/issues{/number}","pulls_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls{/number}","milestones_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/milestones{/number}","notifications_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/labels{/name}","releases_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/releases{/id}","deployments_url":"https://api.github.com/repos/jupyter-incubator/sparkmagic/deployments","created_at":"2015-09-21T15:35:25Z","updated_at":"2016-03-03T15:06:07Z","pushed_at":"2016-03-03T22:30:19Z","git_url":"git://github.com/jupyter-incubator/sparkmagic.git","ssh_url":"git@github.com:jupyter-incubator/sparkmagic.git","clone_url":"https://github.com/jupyter-incubator/sparkmagic.git","svn_url":"https://github.com/jupyter-incubator/sparkmagic","homepage":null,"size":860,"stargazers_count":39,"watchers_count":39,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":16,"forks":7,"open_issues":16,"watchers":39,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/175"},"html":{"href":"https://github.com/jupyter-incubator/sparkmagic/pull/175"},"issue":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/issues/175"},"comments":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/jupyter-incubator/sparkmagic/statuses/11929140f47c45188e70902ec41d8c6d79d4e5e2"}}}}