{"action":"created","comment":{"url":"https://api.github.com/repos/jihaepat/jtelips/pulls/comments/215492419","pull_request_review_id":152768574,"id":215492419,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNTQ5MjQxOQ==","diff_hunk":"@@ -4,26 +4,61 @@\n \n class QuerysetTest2(BaseTestCase):\n     def setUp(self):\n-        dummy01 = Dummy.objects.create()\n-        monitors01 = [x for x in range(0, 10)]\n-        dummy01.monitors = monitors01\n-        dummy01.raw = 'dummy01_raw_test'\n-        dummy01.save()\n+        Dummy.objects.create(temp=1)\n+        Dummy.objects.create(temp=2)\n+        Dummy.objects.create(temp=3)\n+        Dummy.objects.create(temp=4)\n+        Dummy.objects.create(temp=5)\n \n-    # 리뷰요청\n-    # in resolver 테스트가 없어서 테스트를 추가하여 확인하였는데 테스트 통과가 안됩니다.\n-    # 잘못된 방식으로 조회를 해서 그런건가 싶긴한데 한번 확인 부탁드리겠습니다.\n     def test_queryset_in(self):\n-        dummy_01 = Dummy.objects.get(monitors=[x for x in range(0, 10)])\n-\n-        assert dummy_01.monitors == [x for x in range(0, 10)]\n-\n-        in_01 = Dummy.objects.get(raw__in=['dummy'])\n+        dummies = Dummy.objects.filter(temp__in=[1, 2, 3, 4])\n \n-        assert in_01 == dummy_01\n+        assert dummies.count() == 4\n \n     def test_queryset_get_pk(self):\n         dummy_01_id = Dummy.objects.last().id\n         dummy_01 = Dummy.objects.get(pk=dummy_01_id)\n \n-        assert dummy_01.monitors == [x for x in range(0, 10)]\n+        assert dummy_01.temp == 1\n+\n+\n+class QuerysetTest3(BaseTestCase):\n+    def setUp(self):\n+        dummy01 = Dummy.objects.create()\n+        dummy02 = Dummy.objects.create()\n+        dummy03 = Dummy.objects.create()\n+        dummy04 = Dummy.objects.create()\n+        dummy05 = Dummy.objects.create()\n+\n+        dummy01.patent.raw = 'raw_01'\n+        dummy02.patent.raw = 'raw_02'\n+        dummy03.patent.raw = 'raw_03'\n+        dummy04.patent.raw = 'raw_04'\n+        dummy05.patent.raw = 'raw_05'\n+\n+        dummy01.save()\n+        dummy02.save()\n+        dummy03.save()\n+        dummy04.save()\n+        dummy05.save()\n+\n+    def test_queryset_in_with_memory(self):\n+        all_dummy = Dummy.objects.all()\n+        all_dummy._fetch_all()\n+        filter_raw_01 = all_dummy.filter(data__patent__raw__in=('raw_01', 'raw_02',))\n+        assert filter_raw_01.count() == 2\n+\n+    def test_queryset_in_with_db(self):\n+        filter_raw_01 = Dummy.objects.filter(data__patent__raw__in=('raw_01', 'raw_02',))\n+        assert filter_raw_01.count() == 2\n+\n+    def test_queryset_str_in_with_memory(self):\n+        all_dummy = Dummy.objects.all()\n+        all_dummy._fetch_all()\n+        filter_raw_01 = all_dummy.filter(data__patent__raw__in='kkkraw_01kkk')\n+        assert filter_raw_01.count() == 1\n+\n+    def test_queryset_str_in_with_db(self):\n+        filter_raw_01 = Dummy.objects.filter(data__patent__raw__in='kkkraw_01kkk')\n+        # db 에서 조회가 불가능","path":"base/tests/test_queryset2.py","position":63,"original_position":75,"commit_id":"2b88b3576092bcd65d77747347c9e6c9766fefdb","original_commit_id":"2b88b3576092bcd65d77747347c9e6c9766fefdb","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":"따라서 메모리 상에서도 검색을 못하도록 아예 assert 걸어서 막는게 좋음\r\n메모리 상에서 돌때와 DB상에서 돌때의 결과가 다르면? 심각한 버그 발생하기에 딱 좋아서임~~~","created_at":"2018-09-06T04:33:37Z","updated_at":"2018-09-06T04:33:43Z","html_url":"https://github.com/jihaepat/jtelips/pull/140#discussion_r215492419","pull_request_url":"https://api.github.com/repos/jihaepat/jtelips/pulls/140","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/comments/215492419"},"html":{"href":"https://github.com/jihaepat/jtelips/pull/140#discussion_r215492419"},"pull_request":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/140"}}},"pull_request":{"url":"https://api.github.com/repos/jihaepat/jtelips/pulls/140","id":213482078,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNDgyMDc4","html_url":"https://github.com/jihaepat/jtelips/pull/140","diff_url":"https://github.com/jihaepat/jtelips/pull/140.diff","patch_url":"https://github.com/jihaepat/jtelips/pull/140.patch","issue_url":"https://api.github.com/repos/jihaepat/jtelips/issues/140","number":140,"state":"open","locked":false,"title":"Issue coverage 01","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":"","created_at":"2018-09-06T03:01:10Z","updated_at":"2018-09-06T04:33:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a9fe9099318fac44b0246edee38df8acbf7acba9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/jihaepat/jtelips/pulls/140/commits","review_comments_url":"https://api.github.com/repos/jihaepat/jtelips/pulls/140/comments","review_comment_url":"https://api.github.com/repos/jihaepat/jtelips/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jihaepat/jtelips/issues/140/comments","statuses_url":"https://api.github.com/repos/jihaepat/jtelips/statuses/2b88b3576092bcd65d77747347c9e6c9766fefdb","head":{"label":"jihaepat:issue_coverage_01","ref":"issue_coverage_01","sha":"2b88b3576092bcd65d77747347c9e6c9766fefdb","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-09-01T00:01:24Z","pushed_at":"2018-09-06T04:24:27Z","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":14214,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"jihaepat:master","ref":"master","sha":"97ddae5b49515fdcaba40b0d804237910e1d292d","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-09-01T00:01:24Z","pushed_at":"2018-09-06T04:24:27Z","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":14214,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/140"},"html":{"href":"https://github.com/jihaepat/jtelips/pull/140"},"issue":{"href":"https://api.github.com/repos/jihaepat/jtelips/issues/140"},"comments":{"href":"https://api.github.com/repos/jihaepat/jtelips/issues/140/comments"},"review_comments":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/140/comments"},"review_comment":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jihaepat/jtelips/pulls/140/commits"},"statuses":{"href":"https://api.github.com/repos/jihaepat/jtelips/statuses/2b88b3576092bcd65d77747347c9e6c9766fefdb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gulby"}}