{"action":"created","comment":{"url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/comments/63156292","id":63156292,"diff_hunk":"@@ -84,8 +132,101 @@ def test_get_data(self):\n         self.assertEqual(\n             data[10][sample_date]['start'],\n             datetime.time(9, 39, 5)\n+\n         )\n \n+    def test_group_by_weekday(self):\n+        \"\"\"\n+        Test group by weekend\n+        \"\"\"\n+        excepted_result = [[], [0], [17088], [10800], [], [], []]\n+        days = {\n+            datetime.date(2013, 9, 10): {\n+                'end': datetime.time(0, 0, 0),\n+                'start': datetime.time(0, 0, 0),\n+            },\n+            datetime.date(2013, 9, 11): {\n+                'end': datetime.time(17, 6, 28),\n+                'start': datetime.time(12, 21, 40),\n+            },\n+            datetime.date(2013, 9, 12): {\n+                'end': datetime.time(23, 59, 59),\n+                'start': datetime.time(20, 59, 59),\n+            }\n+        }\n+\n+        data = utils.group_by_weekday(days)\n+        self.assertIsInstance(data, list)\n+        self.assertEqual(len(data), 7)\n+        self.assertEqual(data, excepted_result)\n+        self.assertTrue(datetime.datetime.strptime(\n+            str(datetime.date(2013, 9, 12)), '%Y-%m-%d'))","path":"src/presence_analyzer/tests.py","position":115,"original_position":115,"commit_id":"edf98225d1c499763453397c95ef644d296cdb54","original_commit_id":"edf98225d1c499763453397c95ef644d296cdb54","user":{"login":"dpolcyn","id":7630766,"avatar_url":"https://avatars.githubusercontent.com/u/7630766?v=3","gravatar_id":"","url":"https://api.github.com/users/dpolcyn","html_url":"https://github.com/dpolcyn","followers_url":"https://api.github.com/users/dpolcyn/followers","following_url":"https://api.github.com/users/dpolcyn/following{/other_user}","gists_url":"https://api.github.com/users/dpolcyn/gists{/gist_id}","starred_url":"https://api.github.com/users/dpolcyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpolcyn/subscriptions","organizations_url":"https://api.github.com/users/dpolcyn/orgs","repos_url":"https://api.github.com/users/dpolcyn/repos","events_url":"https://api.github.com/users/dpolcyn/events{/privacy}","received_events_url":"https://api.github.com/users/dpolcyn/received_events","type":"User","site_admin":false},"body":"Style","created_at":"2016-05-13T09:32:07Z","updated_at":"2016-05-13T09:32:07Z","html_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski/pull/2#discussion_r63156292","pull_request_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/comments/63156292"},"html":{"href":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski/pull/2#discussion_r63156292"},"pull_request":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/2","id":69469206,"html_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski/pull/2","diff_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski/pull/2.diff","patch_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski/pull/2.patch","issue_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues/2","number":2,"state":"open","locked":false,"title":"Bug 6625 - Dodanie testów","user":{"login":"DBrzoskowski","id":17493446,"avatar_url":"https://avatars.githubusercontent.com/u/17493446?v=3","gravatar_id":"","url":"https://api.github.com/users/DBrzoskowski","html_url":"https://github.com/DBrzoskowski","followers_url":"https://api.github.com/users/DBrzoskowski/followers","following_url":"https://api.github.com/users/DBrzoskowski/following{/other_user}","gists_url":"https://api.github.com/users/DBrzoskowski/gists{/gist_id}","starred_url":"https://api.github.com/users/DBrzoskowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBrzoskowski/subscriptions","organizations_url":"https://api.github.com/users/DBrzoskowski/orgs","repos_url":"https://api.github.com/users/DBrzoskowski/repos","events_url":"https://api.github.com/users/DBrzoskowski/events{/privacy}","received_events_url":"https://api.github.com/users/DBrzoskowski/received_events","type":"User","site_admin":false},"body":"https://bugzilla.stxnext.pl/show_bug.cgi?id=6625","created_at":"2016-05-10T08:48:59Z","updated_at":"2016-05-13T09:32:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d52729456be27a2e2183c6fbed3c3c4ccd91391","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/2/commits","review_comments_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/2/comments","review_comment_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues/2/comments","statuses_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/statuses/edf98225d1c499763453397c95ef644d296cdb54","head":{"label":"DBrzoskowski:bug_6625","ref":"bug_6625","sha":"edf98225d1c499763453397c95ef644d296cdb54","user":{"login":"DBrzoskowski","id":17493446,"avatar_url":"https://avatars.githubusercontent.com/u/17493446?v=3","gravatar_id":"","url":"https://api.github.com/users/DBrzoskowski","html_url":"https://github.com/DBrzoskowski","followers_url":"https://api.github.com/users/DBrzoskowski/followers","following_url":"https://api.github.com/users/DBrzoskowski/following{/other_user}","gists_url":"https://api.github.com/users/DBrzoskowski/gists{/gist_id}","starred_url":"https://api.github.com/users/DBrzoskowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBrzoskowski/subscriptions","organizations_url":"https://api.github.com/users/DBrzoskowski/orgs","repos_url":"https://api.github.com/users/DBrzoskowski/repos","events_url":"https://api.github.com/users/DBrzoskowski/events{/privacy}","received_events_url":"https://api.github.com/users/DBrzoskowski/received_events","type":"User","site_admin":false},"repo":{"id":58203693,"name":"presence-analyzer-dbrzoskowski","full_name":"DBrzoskowski/presence-analyzer-dbrzoskowski","owner":{"login":"DBrzoskowski","id":17493446,"avatar_url":"https://avatars.githubusercontent.com/u/17493446?v=3","gravatar_id":"","url":"https://api.github.com/users/DBrzoskowski","html_url":"https://github.com/DBrzoskowski","followers_url":"https://api.github.com/users/DBrzoskowski/followers","following_url":"https://api.github.com/users/DBrzoskowski/following{/other_user}","gists_url":"https://api.github.com/users/DBrzoskowski/gists{/gist_id}","starred_url":"https://api.github.com/users/DBrzoskowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBrzoskowski/subscriptions","organizations_url":"https://api.github.com/users/DBrzoskowski/orgs","repos_url":"https://api.github.com/users/DBrzoskowski/repos","events_url":"https://api.github.com/users/DBrzoskowski/events{/privacy}","received_events_url":"https://api.github.com/users/DBrzoskowski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski","description":"","fork":true,"url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski","forks_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/forks","keys_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/teams","hooks_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/hooks","issue_events_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues/events{/number}","events_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/events","assignees_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/assignees{/user}","branches_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/branches{/branch}","tags_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/tags","blobs_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/refs{/sha}","trees_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/statuses/{sha}","languages_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/languages","stargazers_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/stargazers","contributors_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/contributors","subscribers_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/subscribers","subscription_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/subscription","commits_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/commits{/sha}","git_commits_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/commits{/sha}","comments_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/comments{/number}","issue_comment_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues/comments{/number}","contents_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/contents/{+path}","compare_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/merges","archive_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/downloads","issues_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues{/number}","pulls_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls{/number}","milestones_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/milestones{/number}","notifications_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/labels{/name}","releases_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/releases{/id}","deployments_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/deployments","created_at":"2016-05-06T11:47:49Z","updated_at":"2016-05-06T11:47:50Z","pushed_at":"2016-05-13T09:29:21Z","git_url":"git://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski.git","ssh_url":"git@github.com:DBrzoskowski/presence-analyzer-dbrzoskowski.git","clone_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski.git","svn_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski","homepage":null,"size":176,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"DBrzoskowski:master","ref":"master","sha":"22afc179311d5d2d07a0d1bf3ccfb7155548933c","user":{"login":"DBrzoskowski","id":17493446,"avatar_url":"https://avatars.githubusercontent.com/u/17493446?v=3","gravatar_id":"","url":"https://api.github.com/users/DBrzoskowski","html_url":"https://github.com/DBrzoskowski","followers_url":"https://api.github.com/users/DBrzoskowski/followers","following_url":"https://api.github.com/users/DBrzoskowski/following{/other_user}","gists_url":"https://api.github.com/users/DBrzoskowski/gists{/gist_id}","starred_url":"https://api.github.com/users/DBrzoskowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBrzoskowski/subscriptions","organizations_url":"https://api.github.com/users/DBrzoskowski/orgs","repos_url":"https://api.github.com/users/DBrzoskowski/repos","events_url":"https://api.github.com/users/DBrzoskowski/events{/privacy}","received_events_url":"https://api.github.com/users/DBrzoskowski/received_events","type":"User","site_admin":false},"repo":{"id":58203693,"name":"presence-analyzer-dbrzoskowski","full_name":"DBrzoskowski/presence-analyzer-dbrzoskowski","owner":{"login":"DBrzoskowski","id":17493446,"avatar_url":"https://avatars.githubusercontent.com/u/17493446?v=3","gravatar_id":"","url":"https://api.github.com/users/DBrzoskowski","html_url":"https://github.com/DBrzoskowski","followers_url":"https://api.github.com/users/DBrzoskowski/followers","following_url":"https://api.github.com/users/DBrzoskowski/following{/other_user}","gists_url":"https://api.github.com/users/DBrzoskowski/gists{/gist_id}","starred_url":"https://api.github.com/users/DBrzoskowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DBrzoskowski/subscriptions","organizations_url":"https://api.github.com/users/DBrzoskowski/orgs","repos_url":"https://api.github.com/users/DBrzoskowski/repos","events_url":"https://api.github.com/users/DBrzoskowski/events{/privacy}","received_events_url":"https://api.github.com/users/DBrzoskowski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski","description":"","fork":true,"url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski","forks_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/forks","keys_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/teams","hooks_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/hooks","issue_events_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues/events{/number}","events_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/events","assignees_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/assignees{/user}","branches_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/branches{/branch}","tags_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/tags","blobs_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/refs{/sha}","trees_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/statuses/{sha}","languages_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/languages","stargazers_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/stargazers","contributors_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/contributors","subscribers_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/subscribers","subscription_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/subscription","commits_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/commits{/sha}","git_commits_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/git/commits{/sha}","comments_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/comments{/number}","issue_comment_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues/comments{/number}","contents_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/contents/{+path}","compare_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/merges","archive_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/downloads","issues_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues{/number}","pulls_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls{/number}","milestones_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/milestones{/number}","notifications_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/labels{/name}","releases_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/releases{/id}","deployments_url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/deployments","created_at":"2016-05-06T11:47:49Z","updated_at":"2016-05-06T11:47:50Z","pushed_at":"2016-05-13T09:29:21Z","git_url":"git://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski.git","ssh_url":"git@github.com:DBrzoskowski/presence-analyzer-dbrzoskowski.git","clone_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski.git","svn_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski","homepage":null,"size":176,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/2"},"html":{"href":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski/pull/2"},"issue":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues/2"},"comments":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/statuses/edf98225d1c499763453397c95ef644d296cdb54"}}}}