{"action":"created","comment":{"url":"https://api.github.com/repos/vmalloc/mongomock/pulls/comments/38613120","id":38613120,"diff_hunk":"@@ -318,6 +319,14 @@ def test__default_fields_to_id_if_empty(self):\n         self.cmp.do.insert({'name':'Chucky', 'type':'doll', 'model':'v6'})\n         self.cmp.compare_ignore_order.find({'name':'Chucky'}, fields = [])\n \n+    def test__do_not_return_objects_without_requested_field(self):\n+        self.cmp.do.insert({'name':'Chucky', 'type':'doll', 'model':'v6'})\n+\tself.cmp.compare.find_one({'name':'Chucky'}, fields = {'surname': True, '_id': False})","path":"tests/test__mongomock.py","position":27,"original_position":27,"commit_id":"747bba9deb6536279508de0185df7914cca0ae48","original_commit_id":"747bba9deb6536279508de0185df7914cca0ae48","user":{"login":"emosenkis","id":1794126,"avatar_url":"https://avatars.githubusercontent.com/u/1794126?v=3","gravatar_id":"","url":"https://api.github.com/users/emosenkis","html_url":"https://github.com/emosenkis","followers_url":"https://api.github.com/users/emosenkis/followers","following_url":"https://api.github.com/users/emosenkis/following{/other_user}","gists_url":"https://api.github.com/users/emosenkis/gists{/gist_id}","starred_url":"https://api.github.com/users/emosenkis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emosenkis/subscriptions","organizations_url":"https://api.github.com/users/emosenkis/orgs","repos_url":"https://api.github.com/users/emosenkis/repos","events_url":"https://api.github.com/users/emosenkis/events{/privacy}","received_events_url":"https://api.github.com/users/emosenkis/received_events","type":"User","site_admin":false},"body":"Whoops. It looks like I forgot about this and deleted my fork, so I don't have an easy way to update this pull request anymore. If someone else wants to recreate and submit my changes, they're more than welcome.","created_at":"2015-09-03T04:55:51Z","updated_at":"2015-09-03T04:55:51Z","html_url":"https://github.com/vmalloc/mongomock/pull/66#discussion_r38613120","pull_request_url":"https://api.github.com/repos/vmalloc/mongomock/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/vmalloc/mongomock/pulls/comments/38613120"},"html":{"href":"https://github.com/vmalloc/mongomock/pull/66#discussion_r38613120"},"pull_request":{"href":"https://api.github.com/repos/vmalloc/mongomock/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/vmalloc/mongomock/pulls/66","id":9057228,"html_url":"https://github.com/vmalloc/mongomock/pull/66","diff_url":"https://github.com/vmalloc/mongomock/pull/66.diff","patch_url":"https://github.com/vmalloc/mongomock/pull/66.patch","issue_url":"https://api.github.com/repos/vmalloc/mongomock/issues/66","number":66,"state":"open","locked":false,"title":"Add tests for more complex array-handling behaviors.","user":{"login":"emosenkis","id":1794126,"avatar_url":"https://avatars.githubusercontent.com/u/1794126?v=3","gravatar_id":"","url":"https://api.github.com/users/emosenkis","html_url":"https://github.com/emosenkis","followers_url":"https://api.github.com/users/emosenkis/followers","following_url":"https://api.github.com/users/emosenkis/following{/other_user}","gists_url":"https://api.github.com/users/emosenkis/gists{/gist_id}","starred_url":"https://api.github.com/users/emosenkis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emosenkis/subscriptions","organizations_url":"https://api.github.com/users/emosenkis/orgs","repos_url":"https://api.github.com/users/emosenkis/repos","events_url":"https://api.github.com/users/emosenkis/events{/privacy}","received_events_url":"https://api.github.com/users/emosenkis/received_events","type":"User","site_admin":false},"body":"Added failing tests for proper handling of arrays in documents being queried and the positional projection operator (http://docs.mongodb.org/manual/reference/operator/projection/positional/#proj._S_)\r\n\r\nAlso adds a passing test to ensure that requesting a field requires that all returned documents have that field.\r\n\r\nFixes a type and removes unnecessary imports.\r\n\r\nI'm interested in making these tests pass, but it looks like it will require seriously reorganizing some of the code implementing Collection.find().","created_at":"2013-10-14T00:37:57Z","updated_at":"2015-09-03T04:55:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e612da256083b5920121c09ba4710a26260be2d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vmalloc/mongomock/pulls/66/commits","review_comments_url":"https://api.github.com/repos/vmalloc/mongomock/pulls/66/comments","review_comment_url":"https://api.github.com/repos/vmalloc/mongomock/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vmalloc/mongomock/issues/66/comments","statuses_url":"https://api.github.com/repos/vmalloc/mongomock/statuses/747bba9deb6536279508de0185df7914cca0ae48","head":{"label":"emosenkis:add_tests","ref":"add_tests","sha":"747bba9deb6536279508de0185df7914cca0ae48","user":{"login":"emosenkis","id":1794126,"avatar_url":"https://avatars.githubusercontent.com/u/1794126?v=3","gravatar_id":"","url":"https://api.github.com/users/emosenkis","html_url":"https://github.com/emosenkis","followers_url":"https://api.github.com/users/emosenkis/followers","following_url":"https://api.github.com/users/emosenkis/following{/other_user}","gists_url":"https://api.github.com/users/emosenkis/gists{/gist_id}","starred_url":"https://api.github.com/users/emosenkis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emosenkis/subscriptions","organizations_url":"https://api.github.com/users/emosenkis/orgs","repos_url":"https://api.github.com/users/emosenkis/repos","events_url":"https://api.github.com/users/emosenkis/events{/privacy}","received_events_url":"https://api.github.com/users/emosenkis/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"vmalloc:master","ref":"master","sha":"8876b790485c35d8771b061d271d200cd9cbfe1f","user":{"login":"vmalloc","id":28710,"avatar_url":"https://avatars.githubusercontent.com/u/28710?v=3","gravatar_id":"","url":"https://api.github.com/users/vmalloc","html_url":"https://github.com/vmalloc","followers_url":"https://api.github.com/users/vmalloc/followers","following_url":"https://api.github.com/users/vmalloc/following{/other_user}","gists_url":"https://api.github.com/users/vmalloc/gists{/gist_id}","starred_url":"https://api.github.com/users/vmalloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmalloc/subscriptions","organizations_url":"https://api.github.com/users/vmalloc/orgs","repos_url":"https://api.github.com/users/vmalloc/repos","events_url":"https://api.github.com/users/vmalloc/events{/privacy}","received_events_url":"https://api.github.com/users/vmalloc/received_events","type":"User","site_admin":false},"repo":{"id":3722168,"name":"mongomock","full_name":"vmalloc/mongomock","owner":{"login":"vmalloc","id":28710,"avatar_url":"https://avatars.githubusercontent.com/u/28710?v=3","gravatar_id":"","url":"https://api.github.com/users/vmalloc","html_url":"https://github.com/vmalloc","followers_url":"https://api.github.com/users/vmalloc/followers","following_url":"https://api.github.com/users/vmalloc/following{/other_user}","gists_url":"https://api.github.com/users/vmalloc/gists{/gist_id}","starred_url":"https://api.github.com/users/vmalloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmalloc/subscriptions","organizations_url":"https://api.github.com/users/vmalloc/orgs","repos_url":"https://api.github.com/users/vmalloc/repos","events_url":"https://api.github.com/users/vmalloc/events{/privacy}","received_events_url":"https://api.github.com/users/vmalloc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vmalloc/mongomock","description":"Small library for mocking pymongo collection objects for testing purposes","fork":false,"url":"https://api.github.com/repos/vmalloc/mongomock","forks_url":"https://api.github.com/repos/vmalloc/mongomock/forks","keys_url":"https://api.github.com/repos/vmalloc/mongomock/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmalloc/mongomock/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmalloc/mongomock/teams","hooks_url":"https://api.github.com/repos/vmalloc/mongomock/hooks","issue_events_url":"https://api.github.com/repos/vmalloc/mongomock/issues/events{/number}","events_url":"https://api.github.com/repos/vmalloc/mongomock/events","assignees_url":"https://api.github.com/repos/vmalloc/mongomock/assignees{/user}","branches_url":"https://api.github.com/repos/vmalloc/mongomock/branches{/branch}","tags_url":"https://api.github.com/repos/vmalloc/mongomock/tags","blobs_url":"https://api.github.com/repos/vmalloc/mongomock/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmalloc/mongomock/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmalloc/mongomock/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmalloc/mongomock/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmalloc/mongomock/statuses/{sha}","languages_url":"https://api.github.com/repos/vmalloc/mongomock/languages","stargazers_url":"https://api.github.com/repos/vmalloc/mongomock/stargazers","contributors_url":"https://api.github.com/repos/vmalloc/mongomock/contributors","subscribers_url":"https://api.github.com/repos/vmalloc/mongomock/subscribers","subscription_url":"https://api.github.com/repos/vmalloc/mongomock/subscription","commits_url":"https://api.github.com/repos/vmalloc/mongomock/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmalloc/mongomock/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmalloc/mongomock/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmalloc/mongomock/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmalloc/mongomock/contents/{+path}","compare_url":"https://api.github.com/repos/vmalloc/mongomock/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmalloc/mongomock/merges","archive_url":"https://api.github.com/repos/vmalloc/mongomock/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmalloc/mongomock/downloads","issues_url":"https://api.github.com/repos/vmalloc/mongomock/issues{/number}","pulls_url":"https://api.github.com/repos/vmalloc/mongomock/pulls{/number}","milestones_url":"https://api.github.com/repos/vmalloc/mongomock/milestones{/number}","notifications_url":"https://api.github.com/repos/vmalloc/mongomock/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmalloc/mongomock/labels{/name}","releases_url":"https://api.github.com/repos/vmalloc/mongomock/releases{/id}","created_at":"2012-03-14T20:50:21Z","updated_at":"2015-08-26T10:10:16Z","pushed_at":"2015-09-02T16:11:13Z","git_url":"git://github.com/vmalloc/mongomock.git","ssh_url":"git@github.com:vmalloc/mongomock.git","clone_url":"https://github.com/vmalloc/mongomock.git","svn_url":"https://github.com/vmalloc/mongomock","homepage":"","size":1855,"stargazers_count":124,"watchers_count":124,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":83,"mirror_url":null,"open_issues_count":24,"forks":83,"open_issues":24,"watchers":124,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vmalloc/mongomock/pulls/66"},"html":{"href":"https://github.com/vmalloc/mongomock/pull/66"},"issue":{"href":"https://api.github.com/repos/vmalloc/mongomock/issues/66"},"comments":{"href":"https://api.github.com/repos/vmalloc/mongomock/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/vmalloc/mongomock/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/vmalloc/mongomock/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vmalloc/mongomock/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/vmalloc/mongomock/statuses/747bba9deb6536279508de0185df7914cca0ae48"}}}}