{"action":"created","comment":{"url":"https://api.github.com/repos/ICTU/quality-report/pulls/comments/182730077","pull_request_review_id":113584880,"id":182730077,"diff_hunk":"@@ -229,6 +229,52 @@ def test_recent_history(self):\n         \"\"\" Test that the metric has no history by default. \"\"\"\n         self.assertFalse(self.__metric.recent_history())\n \n+    @patch.object(metric_source.CompactHistory, 'get_dates')\n+    def test_get_recent_history_dates(self, mock_get_dates):\n+        \"\"\" Test that the metric calls appropriate function on history object and passes the result. \"\"\"\n+        mock_get_dates.return_value = \"whatever\"\n+        project = MagicMock()\n+        project.metric_sources.return_value = [metric_source.CompactHistory]\n+        test_metric = domain.Metric(subject=MagicMock(), project=project)\n+\n+        result = test_metric.get_recent_history_dates()\n+\n+        mock_get_dates.assert_called_once()\n+        self.assertEqual(\"whatever\", result)\n+\n+    @patch.object(metric_source.CompactHistory, 'get_dates')\n+    def test_get_long_history_dates(self, mock_get_dates):\n+        \"\"\" Test that the metric calls appropriate function on history object and passes the result. \"\"\"\n+        mock_get_dates.return_value = \"whatever\"\n+        project = MagicMock()\n+        project.metric_sources.return_value = [metric_source.CompactHistory]\n+        test_metric = domain.Metric(subject=MagicMock(), project=project)\n+\n+        result = test_metric.get_long_history_dates()\n+\n+        mock_get_dates.assert_called_once_with(long_history=True)\n+        self.assertEqual(\"whatever\", result)\n+\n+    @patch.object(metric_source.CompactHistory, 'recent_history')","path":"backend/tests/unittests/domain/measurement/metric_tests.py","position":30,"original_position":30,"commit_id":"b24e4b404d7611569c0b3a29cf769fa9984ec557","original_commit_id":"b24e4b404d7611569c0b3a29cf769fa9984ec557","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"redefinition of unused 'test_recent_history' from line 228","created_at":"2018-04-19T12:37:02Z","updated_at":"2018-04-19T12:37:02Z","html_url":"https://github.com/ICTU/quality-report/pull/361#discussion_r182730077","pull_request_url":"https://api.github.com/repos/ICTU/quality-report/pulls/361","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ICTU/quality-report/pulls/comments/182730077"},"html":{"href":"https://github.com/ICTU/quality-report/pull/361#discussion_r182730077"},"pull_request":{"href":"https://api.github.com/repos/ICTU/quality-report/pulls/361"}}},"pull_request":{"url":"https://api.github.com/repos/ICTU/quality-report/pulls/361","id":182761921,"html_url":"https://github.com/ICTU/quality-report/pull/361","diff_url":"https://github.com/ICTU/quality-report/pull/361.diff","patch_url":"https://github.com/ICTU/quality-report/pull/361.patch","issue_url":"https://api.github.com/repos/ICTU/quality-report/issues/361","number":361,"state":"open","locked":false,"title":"Feature 128 history chart in detail pane","user":{"login":"milenk","id":32734752,"avatar_url":"https://avatars2.githubusercontent.com/u/32734752?v=4","gravatar_id":"","url":"https://api.github.com/users/milenk","html_url":"https://github.com/milenk","followers_url":"https://api.github.com/users/milenk/followers","following_url":"https://api.github.com/users/milenk/following{/other_user}","gists_url":"https://api.github.com/users/milenk/gists{/gist_id}","starred_url":"https://api.github.com/users/milenk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milenk/subscriptions","organizations_url":"https://api.github.com/users/milenk/orgs","repos_url":"https://api.github.com/users/milenk/repos","events_url":"https://api.github.com/users/milenk/events{/privacy}","received_events_url":"https://api.github.com/users/milenk/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-19T12:36:39Z","updated_at":"2018-04-19T12:37:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"757fd181b19465a075c4df8fc7c03024c93151b4","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ICTU/quality-report/pulls/361/commits","review_comments_url":"https://api.github.com/repos/ICTU/quality-report/pulls/361/comments","review_comment_url":"https://api.github.com/repos/ICTU/quality-report/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ICTU/quality-report/issues/361/comments","statuses_url":"https://api.github.com/repos/ICTU/quality-report/statuses/b24e4b404d7611569c0b3a29cf769fa9984ec557","head":{"label":"ICTU:feature-128-history-chart-in-detail-pane","ref":"feature-128-history-chart-in-detail-pane","sha":"b24e4b404d7611569c0b3a29cf769fa9984ec557","user":{"login":"ICTU","id":6009701,"avatar_url":"https://avatars1.githubusercontent.com/u/6009701?v=4","gravatar_id":"","url":"https://api.github.com/users/ICTU","html_url":"https://github.com/ICTU","followers_url":"https://api.github.com/users/ICTU/followers","following_url":"https://api.github.com/users/ICTU/following{/other_user}","gists_url":"https://api.github.com/users/ICTU/gists{/gist_id}","starred_url":"https://api.github.com/users/ICTU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ICTU/subscriptions","organizations_url":"https://api.github.com/users/ICTU/orgs","repos_url":"https://api.github.com/users/ICTU/repos","events_url":"https://api.github.com/users/ICTU/events{/privacy}","received_events_url":"https://api.github.com/users/ICTU/received_events","type":"Organization","site_admin":false},"repo":{"id":16836834,"name":"quality-report","full_name":"ICTU/quality-report","owner":{"login":"ICTU","id":6009701,"avatar_url":"https://avatars1.githubusercontent.com/u/6009701?v=4","gravatar_id":"","url":"https://api.github.com/users/ICTU","html_url":"https://github.com/ICTU","followers_url":"https://api.github.com/users/ICTU/followers","following_url":"https://api.github.com/users/ICTU/following{/other_user}","gists_url":"https://api.github.com/users/ICTU/gists{/gist_id}","starred_url":"https://api.github.com/users/ICTU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ICTU/subscriptions","organizations_url":"https://api.github.com/users/ICTU/orgs","repos_url":"https://api.github.com/users/ICTU/repos","events_url":"https://api.github.com/users/ICTU/events{/privacy}","received_events_url":"https://api.github.com/users/ICTU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ICTU/quality-report","description":"HQ - Holistic Software Quality Reporting","fork":false,"url":"https://api.github.com/repos/ICTU/quality-report","forks_url":"https://api.github.com/repos/ICTU/quality-report/forks","keys_url":"https://api.github.com/repos/ICTU/quality-report/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ICTU/quality-report/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ICTU/quality-report/teams","hooks_url":"https://api.github.com/repos/ICTU/quality-report/hooks","issue_events_url":"https://api.github.com/repos/ICTU/quality-report/issues/events{/number}","events_url":"https://api.github.com/repos/ICTU/quality-report/events","assignees_url":"https://api.github.com/repos/ICTU/quality-report/assignees{/user}","branches_url":"https://api.github.com/repos/ICTU/quality-report/branches{/branch}","tags_url":"https://api.github.com/repos/ICTU/quality-report/tags","blobs_url":"https://api.github.com/repos/ICTU/quality-report/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ICTU/quality-report/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ICTU/quality-report/git/refs{/sha}","trees_url":"https://api.github.com/repos/ICTU/quality-report/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ICTU/quality-report/statuses/{sha}","languages_url":"https://api.github.com/repos/ICTU/quality-report/languages","stargazers_url":"https://api.github.com/repos/ICTU/quality-report/stargazers","contributors_url":"https://api.github.com/repos/ICTU/quality-report/contributors","subscribers_url":"https://api.github.com/repos/ICTU/quality-report/subscribers","subscription_url":"https://api.github.com/repos/ICTU/quality-report/subscription","commits_url":"https://api.github.com/repos/ICTU/quality-report/commits{/sha}","git_commits_url":"https://api.github.com/repos/ICTU/quality-report/git/commits{/sha}","comments_url":"https://api.github.com/repos/ICTU/quality-report/comments{/number}","issue_comment_url":"https://api.github.com/repos/ICTU/quality-report/issues/comments{/number}","contents_url":"https://api.github.com/repos/ICTU/quality-report/contents/{+path}","compare_url":"https://api.github.com/repos/ICTU/quality-report/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ICTU/quality-report/merges","archive_url":"https://api.github.com/repos/ICTU/quality-report/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ICTU/quality-report/downloads","issues_url":"https://api.github.com/repos/ICTU/quality-report/issues{/number}","pulls_url":"https://api.github.com/repos/ICTU/quality-report/pulls{/number}","milestones_url":"https://api.github.com/repos/ICTU/quality-report/milestones{/number}","notifications_url":"https://api.github.com/repos/ICTU/quality-report/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ICTU/quality-report/labels{/name}","releases_url":"https://api.github.com/repos/ICTU/quality-report/releases{/id}","deployments_url":"https://api.github.com/repos/ICTU/quality-report/deployments","created_at":"2014-02-14T12:39:18Z","updated_at":"2018-04-18T06:45:22Z","pushed_at":"2018-04-19T12:36:39Z","git_url":"git://github.com/ICTU/quality-report.git","ssh_url":"git@github.com:ICTU/quality-report.git","clone_url":"https://github.com/ICTU/quality-report.git","svn_url":"https://github.com/ICTU/quality-report","homepage":"http://ictu.github.io/quality-report/","size":8373,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":50,"license":null,"forks":5,"open_issues":50,"watchers":15,"default_branch":"master"}},"base":{"label":"ICTU:master","ref":"master","sha":"438a6b10f9006ec571a7cd44b1936d083bf086c5","user":{"login":"ICTU","id":6009701,"avatar_url":"https://avatars1.githubusercontent.com/u/6009701?v=4","gravatar_id":"","url":"https://api.github.com/users/ICTU","html_url":"https://github.com/ICTU","followers_url":"https://api.github.com/users/ICTU/followers","following_url":"https://api.github.com/users/ICTU/following{/other_user}","gists_url":"https://api.github.com/users/ICTU/gists{/gist_id}","starred_url":"https://api.github.com/users/ICTU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ICTU/subscriptions","organizations_url":"https://api.github.com/users/ICTU/orgs","repos_url":"https://api.github.com/users/ICTU/repos","events_url":"https://api.github.com/users/ICTU/events{/privacy}","received_events_url":"https://api.github.com/users/ICTU/received_events","type":"Organization","site_admin":false},"repo":{"id":16836834,"name":"quality-report","full_name":"ICTU/quality-report","owner":{"login":"ICTU","id":6009701,"avatar_url":"https://avatars1.githubusercontent.com/u/6009701?v=4","gravatar_id":"","url":"https://api.github.com/users/ICTU","html_url":"https://github.com/ICTU","followers_url":"https://api.github.com/users/ICTU/followers","following_url":"https://api.github.com/users/ICTU/following{/other_user}","gists_url":"https://api.github.com/users/ICTU/gists{/gist_id}","starred_url":"https://api.github.com/users/ICTU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ICTU/subscriptions","organizations_url":"https://api.github.com/users/ICTU/orgs","repos_url":"https://api.github.com/users/ICTU/repos","events_url":"https://api.github.com/users/ICTU/events{/privacy}","received_events_url":"https://api.github.com/users/ICTU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ICTU/quality-report","description":"HQ - Holistic Software Quality Reporting","fork":false,"url":"https://api.github.com/repos/ICTU/quality-report","forks_url":"https://api.github.com/repos/ICTU/quality-report/forks","keys_url":"https://api.github.com/repos/ICTU/quality-report/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ICTU/quality-report/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ICTU/quality-report/teams","hooks_url":"https://api.github.com/repos/ICTU/quality-report/hooks","issue_events_url":"https://api.github.com/repos/ICTU/quality-report/issues/events{/number}","events_url":"https://api.github.com/repos/ICTU/quality-report/events","assignees_url":"https://api.github.com/repos/ICTU/quality-report/assignees{/user}","branches_url":"https://api.github.com/repos/ICTU/quality-report/branches{/branch}","tags_url":"https://api.github.com/repos/ICTU/quality-report/tags","blobs_url":"https://api.github.com/repos/ICTU/quality-report/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ICTU/quality-report/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ICTU/quality-report/git/refs{/sha}","trees_url":"https://api.github.com/repos/ICTU/quality-report/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ICTU/quality-report/statuses/{sha}","languages_url":"https://api.github.com/repos/ICTU/quality-report/languages","stargazers_url":"https://api.github.com/repos/ICTU/quality-report/stargazers","contributors_url":"https://api.github.com/repos/ICTU/quality-report/contributors","subscribers_url":"https://api.github.com/repos/ICTU/quality-report/subscribers","subscription_url":"https://api.github.com/repos/ICTU/quality-report/subscription","commits_url":"https://api.github.com/repos/ICTU/quality-report/commits{/sha}","git_commits_url":"https://api.github.com/repos/ICTU/quality-report/git/commits{/sha}","comments_url":"https://api.github.com/repos/ICTU/quality-report/comments{/number}","issue_comment_url":"https://api.github.com/repos/ICTU/quality-report/issues/comments{/number}","contents_url":"https://api.github.com/repos/ICTU/quality-report/contents/{+path}","compare_url":"https://api.github.com/repos/ICTU/quality-report/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ICTU/quality-report/merges","archive_url":"https://api.github.com/repos/ICTU/quality-report/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ICTU/quality-report/downloads","issues_url":"https://api.github.com/repos/ICTU/quality-report/issues{/number}","pulls_url":"https://api.github.com/repos/ICTU/quality-report/pulls{/number}","milestones_url":"https://api.github.com/repos/ICTU/quality-report/milestones{/number}","notifications_url":"https://api.github.com/repos/ICTU/quality-report/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ICTU/quality-report/labels{/name}","releases_url":"https://api.github.com/repos/ICTU/quality-report/releases{/id}","deployments_url":"https://api.github.com/repos/ICTU/quality-report/deployments","created_at":"2014-02-14T12:39:18Z","updated_at":"2018-04-18T06:45:22Z","pushed_at":"2018-04-19T12:36:39Z","git_url":"git://github.com/ICTU/quality-report.git","ssh_url":"git@github.com:ICTU/quality-report.git","clone_url":"https://github.com/ICTU/quality-report.git","svn_url":"https://github.com/ICTU/quality-report","homepage":"http://ictu.github.io/quality-report/","size":8373,"stargazers_count":15,"watchers_count":15,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":50,"license":null,"forks":5,"open_issues":50,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ICTU/quality-report/pulls/361"},"html":{"href":"https://github.com/ICTU/quality-report/pull/361"},"issue":{"href":"https://api.github.com/repos/ICTU/quality-report/issues/361"},"comments":{"href":"https://api.github.com/repos/ICTU/quality-report/issues/361/comments"},"review_comments":{"href":"https://api.github.com/repos/ICTU/quality-report/pulls/361/comments"},"review_comment":{"href":"https://api.github.com/repos/ICTU/quality-report/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ICTU/quality-report/pulls/361/commits"},"statuses":{"href":"https://api.github.com/repos/ICTU/quality-report/statuses/b24e4b404d7611569c0b3a29cf769fa9984ec557"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}