{"action":"created","comment":{"url":"https://api.github.com/repos/DBrzoskowski/presence-analyzer-dbrzoskowski/pulls/comments/62813389","id":62813389,"diff_hunk":"@@ -86,6 +113,60 @@ def test_get_data(self):\n             datetime.time(9, 39, 5)\n         )\n \n+    def test_group_by_weekday(self):\n+        \"\"\"\n+        Test group by weekend\n+        \"\"\"\n+        sample_date = datetime.date(2013, 9, 12)\n+        day = {sample_date: {'end': datetime.time(23, 23, 51),\n+                             'start': datetime.time(10, 48, 46)}}\n+        data = utils.group_by_weekday(day)\n+        self.assertIsInstance(data, list)\n+        self.assertEqual(len(data), 7)\n+        self.assertTrue(datetime.datetime.strptime(\n+            str(sample_date), '%Y-%m-%d'))\n+        self.assertLess(day[sample_date]['end'].hour, 24)\n+        self.assertLess(day[sample_date]['end'].minute, 60)\n+        self.assertLess(day[sample_date]['end'].second, 60)\n+        self.assertLess(day[sample_date]['start'].hour, 24)\n+        self.assertLess(day[sample_date]['start'].minute, 60)\n+        self.assertLess(day[sample_date]['start'].second, 60)\n+\n+    def test_seconds_since_midnight(self):\n+        \"\"\"\n+        Test calculates amount of seconds since midnight.\n+        \"\"\"\n+        sample_date = datetime.time(18, 17, 4)\n+        date = utils.seconds_since_midnight(sample_date)\n+        self.assertLess(sample_date.hour, 24)\n+        self.assertGreater(sample_date.hour, -1)\n+        self.assertLess(sample_date.minute, 60)\n+        self.assertGreater(sample_date.minute, -1)\n+        self.assertLess(sample_date.second, 60)\n+        self.assertGreater(sample_date.second, -1)\n+        self.assertEqual(date, 65824)\n+\n+    def test_interval(self):\n+        \"\"\"\n+        Test interval between two datetime.time objects.\n+\n+        \"\"\"\n+        start_date = datetime.time(8, 31, 6)\n+        end_date = datetime.time(15, 15, 27)\n+        date = utils.interval(start_date, end_date)\n+        self.assertLess(start_date, end_date)\n+        self.assertEqual(date, 24261)\n+\n+    def test_mean(self):\n+        \"\"\"\n+        Test calculates arithmetic mean.\n+        \"\"\"\n+        lista = [24261, 32533, 34323, 32453, 54154, 32412, 31123]","path":"src/presence_analyzer/tests.py","position":109,"original_position":109,"commit_id":"d85805cb536efaf0995722a57ed4978cc98b7d29","original_commit_id":"d85805cb536efaf0995722a57ed4978cc98b7d29","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":"```Lista``` is a polish word.","created_at":"2016-05-11T09:00:36Z","updated_at":"2016-05-11T09:00:36Z","html_url":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski/pull/2#discussion_r62813389","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/62813389"},"html":{"href":"https://github.com/DBrzoskowski/presence-analyzer-dbrzoskowski/pull/2#discussion_r62813389"},"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-11T09:00:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e50e5fd45bf1c696005639b238044035a2f389f9","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/d85805cb536efaf0995722a57ed4978cc98b7d29","head":{"label":"DBrzoskowski:bug_6625","ref":"bug_6625","sha":"d85805cb536efaf0995722a57ed4978cc98b7d29","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-11T08:22:30Z","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":177,"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-11T08:22:30Z","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":177,"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/d85805cb536efaf0995722a57ed4978cc98b7d29"}}}}