{"action":"created","comment":{"url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/comments/33240363","id":33240363,"diff_hunk":"@@ -368,3 +371,192 @@ def test_get_current_hatohol_time(self):\n         self.assertTrue(14 < len(result) < 22)\n         ns = int(result[15: 21])\n         self.assertTrue(0 <= ns < 1000000)\n+\n+\n+class HapiProcessor(unittest.TestCase):\n+    @classmethod\n+    def setUpClass(cls):\n+        cls.__test_queue = DummyQueue()\n+        transporter_args = {\"class\": transporter.Transporter}\n+        cls.sender = haplib.Sender(transporter_args)\n+        cls.processor = haplib.HapiProcessor(cls.sender, \"test\", 0x01)\n+        cls.processor.set_dispatch_queue(cls.__test_queue)\n+        cls.reply_queue = cls.processor.get_reply_queue()\n+        cls.connector = ConnectorForTest(cls.reply_queue)\n+        cls.sender.set_connector(cls.connector)\n+        cls.processor.reset()\n+\n+    def test_reset(self):\n+        self.processor.reset()\n+        prev_hosts = common.returnPrivObj(self.processor, \"__previous_hosts\")\n+        prev_host_groups = common.returnPrivObj(self.processor,\n+                                                \"__previous_host_groups\")\n+        prev_host_group_membership = \\\n+                common.returnPrivObj(self.processor,\n+                                     \"__previous_host_group_membership\")\n+        event_last_info = common.returnPrivObj(self.processor,\n+                                               \"__event_last_info\")\n+        self.assertIsNone(prev_hosts)\n+        self.assertIsNone(prev_host_groups)\n+        self.assertIsNone(prev_host_group_membership)\n+        self.assertIsNone(event_last_info)\n+\n+    def test_set_ms_info(self):\n+        exact_ms = \"test_ms\"\n+        self.processor.set_ms_info(exact_ms)","path":"server/hap2/test/TestHaplib.py","position":null,"original_position":46,"commit_id":"e35188714a3bc1d8248fa8928262051a68403c0a","original_commit_id":"876167ca2f79fcf997749256550aaa2c7f99d83a","user":{"login":"ashie","id":135104,"avatar_url":"https://avatars.githubusercontent.com/u/135104?v=3","gravatar_id":"","url":"https://api.github.com/users/ashie","html_url":"https://github.com/ashie","followers_url":"https://api.github.com/users/ashie/followers","following_url":"https://api.github.com/users/ashie/following{/other_user}","gists_url":"https://api.github.com/users/ashie/gists{/gist_id}","starred_url":"https://api.github.com/users/ashie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashie/subscriptions","organizations_url":"https://api.github.com/users/ashie/orgs","repos_url":"https://api.github.com/users/ashie/repos","events_url":"https://api.github.com/users/ashie/events{/privacy}","received_events_url":"https://api.github.com/users/ashie/received_events","type":"User","site_admin":false},"body":"他の部分をこの変更に追従させると返ってバグを埋め込むリスクがあるので、\r\nいったん最初のコードでマージしましょう。\r\n","created_at":"2015-06-25T10:17:58Z","updated_at":"2015-06-25T10:17:58Z","html_url":"https://github.com/project-hatohol/hatohol/pull/1289#discussion_r33240363","pull_request_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1289","_links":{"self":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/comments/33240363"},"html":{"href":"https://github.com/project-hatohol/hatohol/pull/1289#discussion_r33240363"},"pull_request":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1289"}}},"pull_request":{"url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1289","id":38506252,"html_url":"https://github.com/project-hatohol/hatohol/pull/1289","diff_url":"https://github.com/project-hatohol/hatohol/pull/1289.diff","patch_url":"https://github.com/project-hatohol/hatohol/pull/1289.patch","issue_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/1289","number":1289,"state":"open","locked":false,"title":"Implement a HapiProcessor.","user":{"login":"Mnakagawa","id":7106792,"avatar_url":"https://avatars.githubusercontent.com/u/7106792?v=3","gravatar_id":"","url":"https://api.github.com/users/Mnakagawa","html_url":"https://github.com/Mnakagawa","followers_url":"https://api.github.com/users/Mnakagawa/followers","following_url":"https://api.github.com/users/Mnakagawa/following{/other_user}","gists_url":"https://api.github.com/users/Mnakagawa/gists{/gist_id}","starred_url":"https://api.github.com/users/Mnakagawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mnakagawa/subscriptions","organizations_url":"https://api.github.com/users/Mnakagawa/orgs","repos_url":"https://api.github.com/users/Mnakagawa/repos","events_url":"https://api.github.com/users/Mnakagawa/events{/privacy}","received_events_url":"https://api.github.com/users/Mnakagawa/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-25T02:14:42Z","updated_at":"2015-06-25T10:17:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f867ba4e5978963b77c63a87d66f698c8c4edd8b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1289/commits","review_comments_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1289/comments","review_comment_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/1289/comments","statuses_url":"https://api.github.com/repos/project-hatohol/hatohol/statuses/e35188714a3bc1d8248fa8928262051a68403c0a","head":{"label":"project-hatohol:hap2-dev-3i","ref":"hap2-dev-3i","sha":"e35188714a3bc1d8248fa8928262051a68403c0a","user":{"login":"project-hatohol","id":4715745,"avatar_url":"https://avatars.githubusercontent.com/u/4715745?v=3","gravatar_id":"","url":"https://api.github.com/users/project-hatohol","html_url":"https://github.com/project-hatohol","followers_url":"https://api.github.com/users/project-hatohol/followers","following_url":"https://api.github.com/users/project-hatohol/following{/other_user}","gists_url":"https://api.github.com/users/project-hatohol/gists{/gist_id}","starred_url":"https://api.github.com/users/project-hatohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-hatohol/subscriptions","organizations_url":"https://api.github.com/users/project-hatohol/orgs","repos_url":"https://api.github.com/users/project-hatohol/repos","events_url":"https://api.github.com/users/project-hatohol/events{/privacy}","received_events_url":"https://api.github.com/users/project-hatohol/received_events","type":"Organization","site_admin":false},"repo":{"id":10903163,"name":"hatohol","full_name":"project-hatohol/hatohol","owner":{"login":"project-hatohol","id":4715745,"avatar_url":"https://avatars.githubusercontent.com/u/4715745?v=3","gravatar_id":"","url":"https://api.github.com/users/project-hatohol","html_url":"https://github.com/project-hatohol","followers_url":"https://api.github.com/users/project-hatohol/followers","following_url":"https://api.github.com/users/project-hatohol/following{/other_user}","gists_url":"https://api.github.com/users/project-hatohol/gists{/gist_id}","starred_url":"https://api.github.com/users/project-hatohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-hatohol/subscriptions","organizations_url":"https://api.github.com/users/project-hatohol/orgs","repos_url":"https://api.github.com/users/project-hatohol/repos","events_url":"https://api.github.com/users/project-hatohol/events{/privacy}","received_events_url":"https://api.github.com/users/project-hatohol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-hatohol/hatohol","description":"A unified manager of monitoring software","fork":false,"url":"https://api.github.com/repos/project-hatohol/hatohol","forks_url":"https://api.github.com/repos/project-hatohol/hatohol/forks","keys_url":"https://api.github.com/repos/project-hatohol/hatohol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-hatohol/hatohol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-hatohol/hatohol/teams","hooks_url":"https://api.github.com/repos/project-hatohol/hatohol/hooks","issue_events_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/events{/number}","events_url":"https://api.github.com/repos/project-hatohol/hatohol/events","assignees_url":"https://api.github.com/repos/project-hatohol/hatohol/assignees{/user}","branches_url":"https://api.github.com/repos/project-hatohol/hatohol/branches{/branch}","tags_url":"https://api.github.com/repos/project-hatohol/hatohol/tags","blobs_url":"https://api.github.com/repos/project-hatohol/hatohol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-hatohol/hatohol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-hatohol/hatohol/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-hatohol/hatohol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-hatohol/hatohol/statuses/{sha}","languages_url":"https://api.github.com/repos/project-hatohol/hatohol/languages","stargazers_url":"https://api.github.com/repos/project-hatohol/hatohol/stargazers","contributors_url":"https://api.github.com/repos/project-hatohol/hatohol/contributors","subscribers_url":"https://api.github.com/repos/project-hatohol/hatohol/subscribers","subscription_url":"https://api.github.com/repos/project-hatohol/hatohol/subscription","commits_url":"https://api.github.com/repos/project-hatohol/hatohol/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-hatohol/hatohol/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-hatohol/hatohol/contents/{+path}","compare_url":"https://api.github.com/repos/project-hatohol/hatohol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-hatohol/hatohol/merges","archive_url":"https://api.github.com/repos/project-hatohol/hatohol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-hatohol/hatohol/downloads","issues_url":"https://api.github.com/repos/project-hatohol/hatohol/issues{/number}","pulls_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls{/number}","milestones_url":"https://api.github.com/repos/project-hatohol/hatohol/milestones{/number}","notifications_url":"https://api.github.com/repos/project-hatohol/hatohol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-hatohol/hatohol/labels{/name}","releases_url":"https://api.github.com/repos/project-hatohol/hatohol/releases{/id}","created_at":"2013-06-24T08:45:56Z","updated_at":"2015-06-10T04:23:31Z","pushed_at":"2015-06-25T09:50:22Z","git_url":"git://github.com/project-hatohol/hatohol.git","ssh_url":"git@github.com:project-hatohol/hatohol.git","clone_url":"https://github.com/project-hatohol/hatohol.git","svn_url":"https://github.com/project-hatohol/hatohol","homepage":"http://www.hatohol.org/","size":56563,"stargazers_count":67,"watchers_count":67,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":90,"forks":20,"open_issues":90,"watchers":67,"default_branch":"master"}},"base":{"label":"project-hatohol:master","ref":"master","sha":"2cc3ebfd2a7528dd94ddd7960d313629fc589411","user":{"login":"project-hatohol","id":4715745,"avatar_url":"https://avatars.githubusercontent.com/u/4715745?v=3","gravatar_id":"","url":"https://api.github.com/users/project-hatohol","html_url":"https://github.com/project-hatohol","followers_url":"https://api.github.com/users/project-hatohol/followers","following_url":"https://api.github.com/users/project-hatohol/following{/other_user}","gists_url":"https://api.github.com/users/project-hatohol/gists{/gist_id}","starred_url":"https://api.github.com/users/project-hatohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-hatohol/subscriptions","organizations_url":"https://api.github.com/users/project-hatohol/orgs","repos_url":"https://api.github.com/users/project-hatohol/repos","events_url":"https://api.github.com/users/project-hatohol/events{/privacy}","received_events_url":"https://api.github.com/users/project-hatohol/received_events","type":"Organization","site_admin":false},"repo":{"id":10903163,"name":"hatohol","full_name":"project-hatohol/hatohol","owner":{"login":"project-hatohol","id":4715745,"avatar_url":"https://avatars.githubusercontent.com/u/4715745?v=3","gravatar_id":"","url":"https://api.github.com/users/project-hatohol","html_url":"https://github.com/project-hatohol","followers_url":"https://api.github.com/users/project-hatohol/followers","following_url":"https://api.github.com/users/project-hatohol/following{/other_user}","gists_url":"https://api.github.com/users/project-hatohol/gists{/gist_id}","starred_url":"https://api.github.com/users/project-hatohol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/project-hatohol/subscriptions","organizations_url":"https://api.github.com/users/project-hatohol/orgs","repos_url":"https://api.github.com/users/project-hatohol/repos","events_url":"https://api.github.com/users/project-hatohol/events{/privacy}","received_events_url":"https://api.github.com/users/project-hatohol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/project-hatohol/hatohol","description":"A unified manager of monitoring software","fork":false,"url":"https://api.github.com/repos/project-hatohol/hatohol","forks_url":"https://api.github.com/repos/project-hatohol/hatohol/forks","keys_url":"https://api.github.com/repos/project-hatohol/hatohol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/project-hatohol/hatohol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/project-hatohol/hatohol/teams","hooks_url":"https://api.github.com/repos/project-hatohol/hatohol/hooks","issue_events_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/events{/number}","events_url":"https://api.github.com/repos/project-hatohol/hatohol/events","assignees_url":"https://api.github.com/repos/project-hatohol/hatohol/assignees{/user}","branches_url":"https://api.github.com/repos/project-hatohol/hatohol/branches{/branch}","tags_url":"https://api.github.com/repos/project-hatohol/hatohol/tags","blobs_url":"https://api.github.com/repos/project-hatohol/hatohol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/project-hatohol/hatohol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/project-hatohol/hatohol/git/refs{/sha}","trees_url":"https://api.github.com/repos/project-hatohol/hatohol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/project-hatohol/hatohol/statuses/{sha}","languages_url":"https://api.github.com/repos/project-hatohol/hatohol/languages","stargazers_url":"https://api.github.com/repos/project-hatohol/hatohol/stargazers","contributors_url":"https://api.github.com/repos/project-hatohol/hatohol/contributors","subscribers_url":"https://api.github.com/repos/project-hatohol/hatohol/subscribers","subscription_url":"https://api.github.com/repos/project-hatohol/hatohol/subscription","commits_url":"https://api.github.com/repos/project-hatohol/hatohol/commits{/sha}","git_commits_url":"https://api.github.com/repos/project-hatohol/hatohol/git/commits{/sha}","comments_url":"https://api.github.com/repos/project-hatohol/hatohol/comments{/number}","issue_comment_url":"https://api.github.com/repos/project-hatohol/hatohol/issues/comments{/number}","contents_url":"https://api.github.com/repos/project-hatohol/hatohol/contents/{+path}","compare_url":"https://api.github.com/repos/project-hatohol/hatohol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/project-hatohol/hatohol/merges","archive_url":"https://api.github.com/repos/project-hatohol/hatohol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/project-hatohol/hatohol/downloads","issues_url":"https://api.github.com/repos/project-hatohol/hatohol/issues{/number}","pulls_url":"https://api.github.com/repos/project-hatohol/hatohol/pulls{/number}","milestones_url":"https://api.github.com/repos/project-hatohol/hatohol/milestones{/number}","notifications_url":"https://api.github.com/repos/project-hatohol/hatohol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/project-hatohol/hatohol/labels{/name}","releases_url":"https://api.github.com/repos/project-hatohol/hatohol/releases{/id}","created_at":"2013-06-24T08:45:56Z","updated_at":"2015-06-10T04:23:31Z","pushed_at":"2015-06-25T09:50:22Z","git_url":"git://github.com/project-hatohol/hatohol.git","ssh_url":"git@github.com:project-hatohol/hatohol.git","clone_url":"https://github.com/project-hatohol/hatohol.git","svn_url":"https://github.com/project-hatohol/hatohol","homepage":"http://www.hatohol.org/","size":56563,"stargazers_count":67,"watchers_count":67,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":90,"forks":20,"open_issues":90,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1289"},"html":{"href":"https://github.com/project-hatohol/hatohol/pull/1289"},"issue":{"href":"https://api.github.com/repos/project-hatohol/hatohol/issues/1289"},"comments":{"href":"https://api.github.com/repos/project-hatohol/hatohol/issues/1289/comments"},"review_comments":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1289/comments"},"review_comment":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/project-hatohol/hatohol/pulls/1289/commits"},"statuses":{"href":"https://api.github.com/repos/project-hatohol/hatohol/statuses/e35188714a3bc1d8248fa8928262051a68403c0a"}}}}