{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/comments/223509086","pull_request_review_id":162654444,"id":223509086,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzUwOTA4Ng==","diff_hunk":"@@ -0,0 +1,32 @@\n+import collections\n+import unittest\n+\n+from pymongo.write_concern import WriteConcern\n+\n+\n+class TestWriteConcern(unittest.TestCase):\n+\n+    def test_equality(self):\n+        concern = WriteConcern(j=True, wtimeout=3000)\n+        self.assertEqual(concern, WriteConcern(j=True, wtimeout=3000))\n+        self.assertNotEqual(concern, WriteConcern())\n+\n+    def test_equality_to_none(self):\n+        concern = WriteConcern()\n+        none = None","path":"test/test_write_concern.py","position":16,"original_position":16,"commit_id":"81878e221997cf96b9fc515196129717de7ee87f","original_commit_id":"81878e221997cf96b9fc515196129717de7ee87f","user":{"login":"prashantmital","id":5883388,"node_id":"MDQ6VXNlcjU4ODMzODg=","avatar_url":"https://avatars3.githubusercontent.com/u/5883388?v=4","gravatar_id":"","url":"https://api.github.com/users/prashantmital","html_url":"https://github.com/prashantmital","followers_url":"https://api.github.com/users/prashantmital/followers","following_url":"https://api.github.com/users/prashantmital/following{/other_user}","gists_url":"https://api.github.com/users/prashantmital/gists{/gist_id}","starred_url":"https://api.github.com/users/prashantmital/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashantmital/subscriptions","organizations_url":"https://api.github.com/users/prashantmital/orgs","repos_url":"https://api.github.com/users/prashantmital/repos","events_url":"https://api.github.com/users/prashantmital/events{/privacy}","received_events_url":"https://api.github.com/users/prashantmital/received_events","type":"User","site_admin":false},"body":"Aliasing `None` doesn't really make sense as it is a shared global constant. I would just use `None` directly in the assertions. ","created_at":"2018-10-08T22:00:57Z","updated_at":"2018-10-08T22:02:37Z","html_url":"https://github.com/mongodb/mongo-python-driver/pull/378#discussion_r223509086","pull_request_url":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/378","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/comments/223509086"},"html":{"href":"https://github.com/mongodb/mongo-python-driver/pull/378#discussion_r223509086"},"pull_request":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/378"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/378","id":221218795,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMjE4Nzk1","html_url":"https://github.com/mongodb/mongo-python-driver/pull/378","diff_url":"https://github.com/mongodb/mongo-python-driver/pull/378.diff","patch_url":"https://github.com/mongodb/mongo-python-driver/pull/378.patch","issue_url":"https://api.github.com/repos/mongodb/mongo-python-driver/issues/378","number":378,"state":"open","locked":false,"title":"Fix comparison of a WriteConcern object with None.","user":{"login":"pcorpet","id":7937848,"node_id":"MDQ6VXNlcjc5Mzc4NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/7937848?v=4","gravatar_id":"","url":"https://api.github.com/users/pcorpet","html_url":"https://github.com/pcorpet","followers_url":"https://api.github.com/users/pcorpet/followers","following_url":"https://api.github.com/users/pcorpet/following{/other_user}","gists_url":"https://api.github.com/users/pcorpet/gists{/gist_id}","starred_url":"https://api.github.com/users/pcorpet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcorpet/subscriptions","organizations_url":"https://api.github.com/users/pcorpet/orgs","repos_url":"https://api.github.com/users/pcorpet/repos","events_url":"https://api.github.com/users/pcorpet/events{/privacy}","received_events_url":"https://api.github.com/users/pcorpet/received_events","type":"User","site_admin":false},"body":"This would make errors like in this bug mongomock/mongomock#458 more readable.","created_at":"2018-10-08T19:24:16Z","updated_at":"2018-10-08T22:02:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11f35cf4eb15951b90c61c6b54c1480462e15921","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/378/commits","review_comments_url":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/378/comments","review_comment_url":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/mongo-python-driver/issues/378/comments","statuses_url":"https://api.github.com/repos/mongodb/mongo-python-driver/statuses/81878e221997cf96b9fc515196129717de7ee87f","head":{"label":"pcorpet:master","ref":"master","sha":"81878e221997cf96b9fc515196129717de7ee87f","user":{"login":"pcorpet","id":7937848,"node_id":"MDQ6VXNlcjc5Mzc4NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/7937848?v=4","gravatar_id":"","url":"https://api.github.com/users/pcorpet","html_url":"https://github.com/pcorpet","followers_url":"https://api.github.com/users/pcorpet/followers","following_url":"https://api.github.com/users/pcorpet/following{/other_user}","gists_url":"https://api.github.com/users/pcorpet/gists{/gist_id}","starred_url":"https://api.github.com/users/pcorpet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcorpet/subscriptions","organizations_url":"https://api.github.com/users/pcorpet/orgs","repos_url":"https://api.github.com/users/pcorpet/repos","events_url":"https://api.github.com/users/pcorpet/events{/privacy}","received_events_url":"https://api.github.com/users/pcorpet/received_events","type":"User","site_admin":false},"repo":{"id":152132926,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIxMzI5MjY=","name":"mongo-python-driver","full_name":"pcorpet/mongo-python-driver","private":false,"owner":{"login":"pcorpet","id":7937848,"node_id":"MDQ6VXNlcjc5Mzc4NDg=","avatar_url":"https://avatars2.githubusercontent.com/u/7937848?v=4","gravatar_id":"","url":"https://api.github.com/users/pcorpet","html_url":"https://github.com/pcorpet","followers_url":"https://api.github.com/users/pcorpet/followers","following_url":"https://api.github.com/users/pcorpet/following{/other_user}","gists_url":"https://api.github.com/users/pcorpet/gists{/gist_id}","starred_url":"https://api.github.com/users/pcorpet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcorpet/subscriptions","organizations_url":"https://api.github.com/users/pcorpet/orgs","repos_url":"https://api.github.com/users/pcorpet/repos","events_url":"https://api.github.com/users/pcorpet/events{/privacy}","received_events_url":"https://api.github.com/users/pcorpet/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pcorpet/mongo-python-driver","description":"PyMongo - the Python driver for MongoDB","fork":true,"url":"https://api.github.com/repos/pcorpet/mongo-python-driver","forks_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/forks","keys_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/teams","hooks_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/hooks","issue_events_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/issues/events{/number}","events_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/events","assignees_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/assignees{/user}","branches_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/branches{/branch}","tags_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/tags","blobs_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/languages","stargazers_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/stargazers","contributors_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/contributors","subscribers_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/subscribers","subscription_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/subscription","commits_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/contents/{+path}","compare_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/merges","archive_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/downloads","issues_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/issues{/number}","pulls_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/labels{/name}","releases_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/releases{/id}","deployments_url":"https://api.github.com/repos/pcorpet/mongo-python-driver/deployments","created_at":"2018-10-08T19:14:15Z","updated_at":"2018-10-08T21:12:27Z","pushed_at":"2018-10-08T21:12:25Z","git_url":"git://github.com/pcorpet/mongo-python-driver.git","ssh_url":"git@github.com:pcorpet/mongo-python-driver.git","clone_url":"https://github.com/pcorpet/mongo-python-driver.git","svn_url":"https://github.com/pcorpet/mongo-python-driver","homepage":"http://api.mongodb.org/python","size":13232,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mongodb:master","ref":"master","sha":"dea14beb865731f64a43d6f66f96784d259307db","user":{"login":"mongodb","id":45120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":108051,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgwNTE=","name":"mongo-python-driver","full_name":"mongodb/mongo-python-driver","private":false,"owner":{"login":"mongodb","id":45120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/mongodb/mongo-python-driver","description":"PyMongo - the Python driver for MongoDB","fork":false,"url":"https://api.github.com/repos/mongodb/mongo-python-driver","forks_url":"https://api.github.com/repos/mongodb/mongo-python-driver/forks","keys_url":"https://api.github.com/repos/mongodb/mongo-python-driver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/mongo-python-driver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/mongo-python-driver/teams","hooks_url":"https://api.github.com/repos/mongodb/mongo-python-driver/hooks","issue_events_url":"https://api.github.com/repos/mongodb/mongo-python-driver/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/mongo-python-driver/events","assignees_url":"https://api.github.com/repos/mongodb/mongo-python-driver/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/mongo-python-driver/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/mongo-python-driver/tags","blobs_url":"https://api.github.com/repos/mongodb/mongo-python-driver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/mongo-python-driver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/mongo-python-driver/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/mongo-python-driver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/mongo-python-driver/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/mongo-python-driver/languages","stargazers_url":"https://api.github.com/repos/mongodb/mongo-python-driver/stargazers","contributors_url":"https://api.github.com/repos/mongodb/mongo-python-driver/contributors","subscribers_url":"https://api.github.com/repos/mongodb/mongo-python-driver/subscribers","subscription_url":"https://api.github.com/repos/mongodb/mongo-python-driver/subscription","commits_url":"https://api.github.com/repos/mongodb/mongo-python-driver/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/mongo-python-driver/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/mongo-python-driver/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/mongo-python-driver/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/mongo-python-driver/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/mongo-python-driver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/mongo-python-driver/merges","archive_url":"https://api.github.com/repos/mongodb/mongo-python-driver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/mongo-python-driver/downloads","issues_url":"https://api.github.com/repos/mongodb/mongo-python-driver/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/mongo-python-driver/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/mongo-python-driver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/mongo-python-driver/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/mongo-python-driver/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/mongo-python-driver/deployments","created_at":"2009-01-15T15:18:06Z","updated_at":"2018-10-07T14:54:46Z","pushed_at":"2018-10-08T21:12:26Z","git_url":"git://github.com/mongodb/mongo-python-driver.git","ssh_url":"git@github.com:mongodb/mongo-python-driver.git","clone_url":"https://github.com/mongodb/mongo-python-driver.git","svn_url":"https://github.com/mongodb/mongo-python-driver","homepage":"http://api.mongodb.org/python","size":13229,"stargazers_count":2521,"watchers_count":2521,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":831,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":831,"open_issues":8,"watchers":2521,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/378"},"html":{"href":"https://github.com/mongodb/mongo-python-driver/pull/378"},"issue":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/issues/378"},"comments":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/issues/378/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/378/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/pulls/378/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/mongo-python-driver/statuses/81878e221997cf96b9fc515196129717de7ee87f"}},"author_association":"NONE"}}
{"actor":{"display_login":"prashantmital"}}