{"action":"created","comment":{"url":"https://api.github.com/repos/jihaepat/jtelips/pulls/comments/198691508","pull_request_review_id":132667897,"id":198691508,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODY5MTUwOA==","diff_hunk":"@@ -0,0 +1,98 @@\n+from base.tests import BaseTestCase\n+from base.types import Type\n+from task.enums import TaskStatus\n+from task.models import A, Task, B1\n+\n+\n+class CompleteTaskWithSplitTest(BaseTestCase):\n+    def test_uncompleted_splits(self):\n+        a = A.objects.create()\n+        assert Task.objects.count() == 2\n+\n+        b1 = B1.objects.first()\n+        c1 = b1.complete(Type.B2)\n+        assert b1.parent == a\n+\n+        c2 = c1.complete(Type.C2)\n+\n+        splited_task_1 = c2.split(Type.A)\n+        splited_task_2 = c2.split(Type.A)\n+        assert b1.splited_tasks.count() == 0\n+        assert splited_task_1.split_from == a\n+        assert splited_task_2.split_from == a\n+\n+        c3 = c2.complete(Type.C3)\n+        splited_task_3 = c3.split(Type.A)\n+        splited_task_4 = c3.split(Type.A)\n+        assert splited_task_3.split_from == a\n+        assert splited_task_4.split_from == a\n+\n+        with self.assertRaises(AssertionError):\n+            assert all(\n+                [task.task_status is TaskStatus.COMPLETED for task in\n+                 a.splited_tasks.all()]), 'splite 된 task가 완료되지 않았습니다.'\n+\n+        assert a.task_status == TaskStatus.PREPARED\n+\n+\n+class CompleteTaskWithSplitTest2(BaseTestCase):\n+    def test_completed_splits(self):\n+        a = A.objects.create()\n+        assert Task.objects.count() == 2\n+\n+        b1 = B1.objects.first()\n+        c1 = b1.complete(Type.B2)\n+        assert b1.parent == a\n+\n+        c2 = c1.complete(Type.C2)\n+\n+        splited_task_a1 = c2.split(Type.A)\n+        splited_task_a2 = c2.split(Type.A)\n+        assert b1.splited_tasks.count() == 0\n+        assert splited_task_a1.split_from == a\n+        assert splited_task_a2.split_from == a\n+\n+        c3 = c2.complete(Type.C3)\n+        splited_task_a3 = c3.split(Type.A)\n+        splited_task_a4 = c3.split(Type.A)\n+        assert splited_task_a3.split_from == a\n+        assert splited_task_a4.split_from == a\n+\n+        splited_task_a1_b1 = splited_task_a1.childs.first()\n+        splited_task_a1_c1 = splited_task_a1_b1.complete(Type.B2)\n+        splited_task_a1_c2 = splited_task_a1_c1.complete(Type.C2)\n+        splited_task_a1_c3 = splited_task_a1_c2.complete(Type.C3)\n+        splited_task_a1_b3 = splited_task_a1_c3.complete(Type.B3)\n+        splited_task_a1_b3.complete(None)\n+\n+        splited_task_a2_b1 = splited_task_a2.childs.first()\n+        splited_task_a2_c1 = splited_task_a2_b1.complete(Type.B2)\n+        splited_task_a2_c2 = splited_task_a2_c1.complete(Type.C2)\n+        splited_task_a2_c3 = splited_task_a2_c2.complete(Type.C3)\n+        splited_task_a2_b3 = splited_task_a2_c3.complete(Type.B3)\n+        splited_task_a2_b3.complete(None)\n+\n+        splited_task_a3_b1 = splited_task_a3.childs.first()\n+        splited_task_a3_c1 = splited_task_a3_b1.complete(Type.B2)\n+        splited_task_a3_c2 = splited_task_a3_c1.complete(Type.C2)\n+        splited_task_a3_c3 = splited_task_a3_c2.complete(Type.C3)\n+        splited_task_a3_b3 = splited_task_a3_c3.complete(Type.B3)\n+        splited_task_a3_b3.complete(None)\n+\n+        splited_task_a4_b1 = splited_task_a4.childs.first()\n+        splited_task_a4_c1 = splited_task_a4_b1.complete(Type.B2)\n+        splited_task_a4_c2 = splited_task_a4_c1.complete(Type.C2)\n+        splited_task_a4_c3 = splited_task_a4_c2.complete(Type.C3)\n+        splited_task_a4_b3 = splited_task_a4_c3.complete(Type.B3)\n+        splited_task_a4_b3.complete(None)\n+\n+        # with self.assertRaises(AssertionError):\n+        assert all(\n+            [task.task_status is TaskStatus.COMPLETED for task in\n+             a.splited_tasks.all()]), 'splite 된 task가 완료되지 않았습니다.'","path":"task/tests/test_complete_with_splited.py","position":92,"original_position":92,"commit_id":"48301a6fcee9bcf7d7ad5dc1bab5b980cf733180","original_commit_id":"48301a6fcee9bcf7d7ad5dc1bab5b980cf733180","user":{"login":"gulby","id":15087566,"node_id":"MDQ6VXNlcjE1MDg3NTY2","avatar_url":"https://avatars2.githubusercontent.com/u/15087566?v=4","gravatar_id":"","url":"https://api.github.com/users/gulby","html_url":"https://github.com/gulby","followers_url":"https://api.github.com/users/gulby/followers","following_url":"https://api.github.com/users/gulby/following{/other_user}","gists_url":"https://api.github.com/users/gulby/gists{/gist_id}","starred_url":"https://api.github.com/users/gulby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gulby/subscriptions","organizations_url":"https://api.github.com/users/gulby/orgs","repos_url":"https://api.github.com/users/gulby/repos","events_url":"https://api.github.com/users/gulby/events{/privacy}","received_events_url":"https://api.github.com/users/gulby/received_events","type":"User","site_admin":false},"body":"상동\r\n","created_at":"2018-06-28T02:16:25Z","updated_at":"2018-06-28T02:16:53Z","html_url":"https://github.com/jihaepat/jtelips/pull/72#discussion_r198691508","pull_request_url":"https://api.github.com/repos/jihaepat/jtelips/pulls/72","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/comments/198691508"},"html":{"href":"https://github.com/jihaepat/jtelips/pull/72#discussion_r198691508"},"pull_request":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/jihaepat/jtelips/pulls/72","id":197586183,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NTg2MTgz","html_url":"https://github.com/jihaepat/jtelips/pull/72","diff_url":"https://github.com/jihaepat/jtelips/pull/72.diff","patch_url":"https://github.com/jihaepat/jtelips/pull/72.patch","issue_url":"https://api.github.com/repos/jihaepat/jtelips/issues/72","number":72,"state":"open","locked":false,"title":"Issue split task","user":{"login":"lhs950204","id":19319167,"node_id":"MDQ6VXNlcjE5MzE5MTY3","avatar_url":"https://avatars0.githubusercontent.com/u/19319167?v=4","gravatar_id":"","url":"https://api.github.com/users/lhs950204","html_url":"https://github.com/lhs950204","followers_url":"https://api.github.com/users/lhs950204/followers","following_url":"https://api.github.com/users/lhs950204/following{/other_user}","gists_url":"https://api.github.com/users/lhs950204/gists{/gist_id}","starred_url":"https://api.github.com/users/lhs950204/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhs950204/subscriptions","organizations_url":"https://api.github.com/users/lhs950204/orgs","repos_url":"https://api.github.com/users/lhs950204/repos","events_url":"https://api.github.com/users/lhs950204/events{/privacy}","received_events_url":"https://api.github.com/users/lhs950204/received_events","type":"User","site_admin":false},"body":"split함수 구현 1차 완료\r\nsplits 가 존재하면 complete, drop할수 없도록 막음\r\n현재 split된 task에서 drop호출시 split된 task의 parent가 존재하지 않아 오류발생\r\n-> split_from 이 존재하면 return None을 추가하여 오류 수정","created_at":"2018-06-27T00:24:37Z","updated_at":"2018-06-28T02:16:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3e04a106d059f42ed0d495b90e27bc7b8f76908","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jihaepat/jtelips/pulls/72/commits","review_comments_url":"https://api.github.com/repos/jihaepat/jtelips/pulls/72/comments","review_comment_url":"https://api.github.com/repos/jihaepat/jtelips/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jihaepat/jtelips/issues/72/comments","statuses_url":"https://api.github.com/repos/jihaepat/jtelips/statuses/48301a6fcee9bcf7d7ad5dc1bab5b980cf733180","head":{"label":"jihaepat:issue_split_task","ref":"issue_split_task","sha":"48301a6fcee9bcf7d7ad5dc1bab5b980cf733180","user":{"login":"jihaepat","id":37129057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MTI5MDU3","avatar_url":"https://avatars3.githubusercontent.com/u/37129057?v=4","gravatar_id":"","url":"https://api.github.com/users/jihaepat","html_url":"https://github.com/jihaepat","followers_url":"https://api.github.com/users/jihaepat/followers","following_url":"https://api.github.com/users/jihaepat/following{/other_user}","gists_url":"https://api.github.com/users/jihaepat/gists{/gist_id}","starred_url":"https://api.github.com/users/jihaepat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihaepat/subscriptions","organizations_url":"https://api.github.com/users/jihaepat/orgs","repos_url":"https://api.github.com/users/jihaepat/repos","events_url":"https://api.github.com/users/jihaepat/events{/privacy}","received_events_url":"https://api.github.com/users/jihaepat/received_events","type":"Organization","site_admin":false},"repo":{"id":126777156,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY3NzcxNTY=","name":"jtelips","full_name":"jihaepat/jtelips","owner":{"login":"jihaepat","id":37129057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MTI5MDU3","avatar_url":"https://avatars3.githubusercontent.com/u/37129057?v=4","gravatar_id":"","url":"https://api.github.com/users/jihaepat","html_url":"https://github.com/jihaepat","followers_url":"https://api.github.com/users/jihaepat/followers","following_url":"https://api.github.com/users/jihaepat/following{/other_user}","gists_url":"https://api.github.com/users/jihaepat/gists{/gist_id}","starred_url":"https://api.github.com/users/jihaepat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihaepat/subscriptions","organizations_url":"https://api.github.com/users/jihaepat/orgs","repos_url":"https://api.github.com/users/jihaepat/repos","events_url":"https://api.github.com/users/jihaepat/events{/privacy}","received_events_url":"https://api.github.com/users/jihaepat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jihaepat/jtelips","description":null,"fork":false,"url":"https://api.github.com/repos/jihaepat/jtelips","forks_url":"https://api.github.com/repos/jihaepat/jtelips/forks","keys_url":"https://api.github.com/repos/jihaepat/jtelips/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jihaepat/jtelips/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jihaepat/jtelips/teams","hooks_url":"https://api.github.com/repos/jihaepat/jtelips/hooks","issue_events_url":"https://api.github.com/repos/jihaepat/jtelips/issues/events{/number}","events_url":"https://api.github.com/repos/jihaepat/jtelips/events","assignees_url":"https://api.github.com/repos/jihaepat/jtelips/assignees{/user}","branches_url":"https://api.github.com/repos/jihaepat/jtelips/branches{/branch}","tags_url":"https://api.github.com/repos/jihaepat/jtelips/tags","blobs_url":"https://api.github.com/repos/jihaepat/jtelips/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jihaepat/jtelips/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jihaepat/jtelips/git/refs{/sha}","trees_url":"https://api.github.com/repos/jihaepat/jtelips/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jihaepat/jtelips/statuses/{sha}","languages_url":"https://api.github.com/repos/jihaepat/jtelips/languages","stargazers_url":"https://api.github.com/repos/jihaepat/jtelips/stargazers","contributors_url":"https://api.github.com/repos/jihaepat/jtelips/contributors","subscribers_url":"https://api.github.com/repos/jihaepat/jtelips/subscribers","subscription_url":"https://api.github.com/repos/jihaepat/jtelips/subscription","commits_url":"https://api.github.com/repos/jihaepat/jtelips/commits{/sha}","git_commits_url":"https://api.github.com/repos/jihaepat/jtelips/git/commits{/sha}","comments_url":"https://api.github.com/repos/jihaepat/jtelips/comments{/number}","issue_comment_url":"https://api.github.com/repos/jihaepat/jtelips/issues/comments{/number}","contents_url":"https://api.github.com/repos/jihaepat/jtelips/contents/{+path}","compare_url":"https://api.github.com/repos/jihaepat/jtelips/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jihaepat/jtelips/merges","archive_url":"https://api.github.com/repos/jihaepat/jtelips/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jihaepat/jtelips/downloads","issues_url":"https://api.github.com/repos/jihaepat/jtelips/issues{/number}","pulls_url":"https://api.github.com/repos/jihaepat/jtelips/pulls{/number}","milestones_url":"https://api.github.com/repos/jihaepat/jtelips/milestones{/number}","notifications_url":"https://api.github.com/repos/jihaepat/jtelips/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jihaepat/jtelips/labels{/name}","releases_url":"https://api.github.com/repos/jihaepat/jtelips/releases{/id}","deployments_url":"https://api.github.com/repos/jihaepat/jtelips/deployments","created_at":"2018-03-26T05:23:21Z","updated_at":"2018-06-26T09:52:26Z","pushed_at":"2018-06-28T01:29:28Z","git_url":"git://github.com/jihaepat/jtelips.git","ssh_url":"git@github.com:jihaepat/jtelips.git","clone_url":"https://github.com/jihaepat/jtelips.git","svn_url":"https://github.com/jihaepat/jtelips","homepage":null,"size":10630,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"jihaepat:master","ref":"master","sha":"068509f3016e2b41e5f2180a42917d7ced418074","user":{"login":"jihaepat","id":37129057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MTI5MDU3","avatar_url":"https://avatars3.githubusercontent.com/u/37129057?v=4","gravatar_id":"","url":"https://api.github.com/users/jihaepat","html_url":"https://github.com/jihaepat","followers_url":"https://api.github.com/users/jihaepat/followers","following_url":"https://api.github.com/users/jihaepat/following{/other_user}","gists_url":"https://api.github.com/users/jihaepat/gists{/gist_id}","starred_url":"https://api.github.com/users/jihaepat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihaepat/subscriptions","organizations_url":"https://api.github.com/users/jihaepat/orgs","repos_url":"https://api.github.com/users/jihaepat/repos","events_url":"https://api.github.com/users/jihaepat/events{/privacy}","received_events_url":"https://api.github.com/users/jihaepat/received_events","type":"Organization","site_admin":false},"repo":{"id":126777156,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY3NzcxNTY=","name":"jtelips","full_name":"jihaepat/jtelips","owner":{"login":"jihaepat","id":37129057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM3MTI5MDU3","avatar_url":"https://avatars3.githubusercontent.com/u/37129057?v=4","gravatar_id":"","url":"https://api.github.com/users/jihaepat","html_url":"https://github.com/jihaepat","followers_url":"https://api.github.com/users/jihaepat/followers","following_url":"https://api.github.com/users/jihaepat/following{/other_user}","gists_url":"https://api.github.com/users/jihaepat/gists{/gist_id}","starred_url":"https://api.github.com/users/jihaepat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jihaepat/subscriptions","organizations_url":"https://api.github.com/users/jihaepat/orgs","repos_url":"https://api.github.com/users/jihaepat/repos","events_url":"https://api.github.com/users/jihaepat/events{/privacy}","received_events_url":"https://api.github.com/users/jihaepat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jihaepat/jtelips","description":null,"fork":false,"url":"https://api.github.com/repos/jihaepat/jtelips","forks_url":"https://api.github.com/repos/jihaepat/jtelips/forks","keys_url":"https://api.github.com/repos/jihaepat/jtelips/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jihaepat/jtelips/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jihaepat/jtelips/teams","hooks_url":"https://api.github.com/repos/jihaepat/jtelips/hooks","issue_events_url":"https://api.github.com/repos/jihaepat/jtelips/issues/events{/number}","events_url":"https://api.github.com/repos/jihaepat/jtelips/events","assignees_url":"https://api.github.com/repos/jihaepat/jtelips/assignees{/user}","branches_url":"https://api.github.com/repos/jihaepat/jtelips/branches{/branch}","tags_url":"https://api.github.com/repos/jihaepat/jtelips/tags","blobs_url":"https://api.github.com/repos/jihaepat/jtelips/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jihaepat/jtelips/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jihaepat/jtelips/git/refs{/sha}","trees_url":"https://api.github.com/repos/jihaepat/jtelips/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jihaepat/jtelips/statuses/{sha}","languages_url":"https://api.github.com/repos/jihaepat/jtelips/languages","stargazers_url":"https://api.github.com/repos/jihaepat/jtelips/stargazers","contributors_url":"https://api.github.com/repos/jihaepat/jtelips/contributors","subscribers_url":"https://api.github.com/repos/jihaepat/jtelips/subscribers","subscription_url":"https://api.github.com/repos/jihaepat/jtelips/subscription","commits_url":"https://api.github.com/repos/jihaepat/jtelips/commits{/sha}","git_commits_url":"https://api.github.com/repos/jihaepat/jtelips/git/commits{/sha}","comments_url":"https://api.github.com/repos/jihaepat/jtelips/comments{/number}","issue_comment_url":"https://api.github.com/repos/jihaepat/jtelips/issues/comments{/number}","contents_url":"https://api.github.com/repos/jihaepat/jtelips/contents/{+path}","compare_url":"https://api.github.com/repos/jihaepat/jtelips/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jihaepat/jtelips/merges","archive_url":"https://api.github.com/repos/jihaepat/jtelips/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jihaepat/jtelips/downloads","issues_url":"https://api.github.com/repos/jihaepat/jtelips/issues{/number}","pulls_url":"https://api.github.com/repos/jihaepat/jtelips/pulls{/number}","milestones_url":"https://api.github.com/repos/jihaepat/jtelips/milestones{/number}","notifications_url":"https://api.github.com/repos/jihaepat/jtelips/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jihaepat/jtelips/labels{/name}","releases_url":"https://api.github.com/repos/jihaepat/jtelips/releases{/id}","deployments_url":"https://api.github.com/repos/jihaepat/jtelips/deployments","created_at":"2018-03-26T05:23:21Z","updated_at":"2018-06-26T09:52:26Z","pushed_at":"2018-06-28T01:29:28Z","git_url":"git://github.com/jihaepat/jtelips.git","ssh_url":"git@github.com:jihaepat/jtelips.git","clone_url":"https://github.com/jihaepat/jtelips.git","svn_url":"https://github.com/jihaepat/jtelips","homepage":null,"size":10630,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/72"},"html":{"href":"https://github.com/jihaepat/jtelips/pull/72"},"issue":{"href":"https://api.github.com/repos/jihaepat/jtelips/issues/72"},"comments":{"href":"https://api.github.com/repos/jihaepat/jtelips/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/jihaepat/jtelips/statuses/48301a6fcee9bcf7d7ad5dc1bab5b980cf733180"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gulby"}}