{"action":"created","comment":{"url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/comments/211513193","pull_request_review_id":147945545,"id":211513193,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTUxMzE5Mw==","diff_hunk":"@@ -0,0 +1,56 @@\n+import os\n+import pytest\n+\n+from tests.helpers import IntegrationTestCaseBase\n+\n+\n+@pytest.mark.integration\n+class TestPing(IntegrationTestCaseBase):\n+    def setup_method(self):\n+        super(TestPing, self).setup_method()\n+        self.rebirthdb_host=os.getenv('REBIRTHDB_HOST')\n+\n+    def teardown_method(self):\n+        with self.r.connect(host=self.rebirthdb_host) as conn:\n+            curr = self.r.db(\"rethinkdb\").table(\"users\").filter(\n+                self.r.row[\"id\"].ne(\"admin\")\n+            ).delete().run(conn)\n+            assert list(curr)\n+        super(TestPing, self).teardown_method()\n+\n+    def test_bad_password(self):\n+        with pytest.raises(self.r.ReqlAuthError):\n+            self.r.connect(password=\"0xDEADBEEF\", host=self.rebirthdb_host)\n+\n+    def test_password_connect(self):\n+        with self.r.connect(user=\"admin\", password=\"\", host=self.rebirthdb_host) as conn:\n+            curr = self.r.db(\"rethinkdb\").table(\"users\").insert(\n+                {\"id\": \"user\", \"password\": \"0xDEADBEEF\"}\n+            ).run(conn)\n+            assert curr == {\n+                'deleted': 0,\n+                'errors': 0,\n+                'inserted': 1,\n+                'replaced': 0,\n+                'skipped': 0,\n+                'unchanged': 0}\n+            curr = self.r.db(\"rethinkdb\").grant(\"user\", {\"read\": True}).run(conn)\n+            assert curr == {\n+                'granted': 1,\n+                'permissions_changes': [\n+                    {\n+                        'new_val': {'read': True},\n+                        'old_val': None}]}\n+        with self.r.connect(user=\"user\", password=\"0xDEADBEEF\", host=self.rebirthdb_host) as conn:\n+            curr = self.r.db(\"rethinkdb\").table(\"users\").get(\"admin\").run(conn)\n+            assert curr == {'id': 'admin', 'password': False}\n+            with pytest.raises(self.r.ReqlPermissionError):\n+                curr = self.r.db(\"rethinkdb\").table(\"users\").insert(\n+                    {\"id\": \"bob\", \"password\": \"\"}\n+                ).run(conn)\n+                assert curr is False\n+\n+    def test_context_manager(self):\n+        with self.r.connect(host=self.rebirthdb_host) as conn:","path":"tests/integration/test_ping.py","position":54,"original_position":54,"commit_id":"8af08a90c802214f23cf1f6c0883a80f147629f3","original_commit_id":"8af08a90c802214f23cf1f6c0883a80f147629f3","user":{"login":"gabor-boros","id":19173947,"node_id":"MDQ6VXNlcjE5MTczOTQ3","avatar_url":"https://avatars3.githubusercontent.com/u/19173947?v=4","gravatar_id":"","url":"https://api.github.com/users/gabor-boros","html_url":"https://github.com/gabor-boros","followers_url":"https://api.github.com/users/gabor-boros/followers","following_url":"https://api.github.com/users/gabor-boros/following{/other_user}","gists_url":"https://api.github.com/users/gabor-boros/gists{/gist_id}","starred_url":"https://api.github.com/users/gabor-boros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabor-boros/subscriptions","organizations_url":"https://api.github.com/users/gabor-boros/orgs","repos_url":"https://api.github.com/users/gabor-boros/repos","events_url":"https://api.github.com/users/gabor-boros/events{/privacy}","received_events_url":"https://api.github.com/users/gabor-boros/received_events","type":"User","site_admin":false},"body":"Agree.","created_at":"2018-08-21T08:06:48Z","updated_at":"2018-08-21T08:06:48Z","html_url":"https://github.com/RebirthDB/rebirthdb-python/pull/33#discussion_r211513193","pull_request_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/33","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/comments/211513193"},"html":{"href":"https://github.com/RebirthDB/rebirthdb-python/pull/33#discussion_r211513193"},"pull_request":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/33"}},"in_reply_to_id":211506522},"pull_request":{"url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/33","id":209649374,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5NjQ5Mzc0","html_url":"https://github.com/RebirthDB/rebirthdb-python/pull/33","diff_url":"https://github.com/RebirthDB/rebirthdb-python/pull/33.diff","patch_url":"https://github.com/RebirthDB/rebirthdb-python/pull/33.patch","issue_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues/33","number":33,"state":"open","locked":false,"title":"Create connection integration.","user":{"login":"grandquista","id":2058304,"node_id":"MDQ6VXNlcjIwNTgzMDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/2058304?v=4","gravatar_id":"","url":"https://api.github.com/users/grandquista","html_url":"https://github.com/grandquista","followers_url":"https://api.github.com/users/grandquista/followers","following_url":"https://api.github.com/users/grandquista/following{/other_user}","gists_url":"https://api.github.com/users/grandquista/gists{/gist_id}","starred_url":"https://api.github.com/users/grandquista/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grandquista/subscriptions","organizations_url":"https://api.github.com/users/grandquista/orgs","repos_url":"https://api.github.com/users/grandquista/repos","events_url":"https://api.github.com/users/grandquista/events{/privacy}","received_events_url":"https://api.github.com/users/grandquista/received_events","type":"User","site_admin":false},"body":"Started work on #23. This is being run against RebirthDB/rebirthdb next. Found and fixed a bug where `OSError` gets caught here on some permission denied cases. Tests for integration up to finding the bug are included. It should be noted here that the system db is still `\"rethinkdb\"`.","created_at":"2018-08-20T21:30:41Z","updated_at":"2018-08-21T08:06:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ac76ab7be97cacf3df8db19b26d44b0438abb02","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":998623983,"node_id":"MDU6TGFiZWw5OTg2MjM5ODM=","url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/labels/quality%20issue%20fix","name":"quality issue fix","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/33/commits","review_comments_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/33/comments","review_comment_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues/33/comments","statuses_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/statuses/8af08a90c802214f23cf1f6c0883a80f147629f3","head":{"label":"RebirthDB:connection-integration","ref":"connection-integration","sha":"8af08a90c802214f23cf1f6c0883a80f147629f3","user":{"login":"RebirthDB","id":39274861,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5Mjc0ODYx","avatar_url":"https://avatars1.githubusercontent.com/u/39274861?v=4","gravatar_id":"","url":"https://api.github.com/users/RebirthDB","html_url":"https://github.com/RebirthDB","followers_url":"https://api.github.com/users/RebirthDB/followers","following_url":"https://api.github.com/users/RebirthDB/following{/other_user}","gists_url":"https://api.github.com/users/RebirthDB/gists{/gist_id}","starred_url":"https://api.github.com/users/RebirthDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RebirthDB/subscriptions","organizations_url":"https://api.github.com/users/RebirthDB/orgs","repos_url":"https://api.github.com/users/RebirthDB/repos","events_url":"https://api.github.com/users/RebirthDB/events{/privacy}","received_events_url":"https://api.github.com/users/RebirthDB/received_events","type":"Organization","site_admin":false},"repo":{"id":134593743,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ1OTM3NDM=","name":"rebirthdb-python","full_name":"RebirthDB/rebirthdb-python","owner":{"login":"RebirthDB","id":39274861,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5Mjc0ODYx","avatar_url":"https://avatars1.githubusercontent.com/u/39274861?v=4","gravatar_id":"","url":"https://api.github.com/users/RebirthDB","html_url":"https://github.com/RebirthDB","followers_url":"https://api.github.com/users/RebirthDB/followers","following_url":"https://api.github.com/users/RebirthDB/following{/other_user}","gists_url":"https://api.github.com/users/RebirthDB/gists{/gist_id}","starred_url":"https://api.github.com/users/RebirthDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RebirthDB/subscriptions","organizations_url":"https://api.github.com/users/RebirthDB/orgs","repos_url":"https://api.github.com/users/RebirthDB/repos","events_url":"https://api.github.com/users/RebirthDB/events{/privacy}","received_events_url":"https://api.github.com/users/RebirthDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RebirthDB/rebirthdb-python","description":"Python driver for RebirthDB","fork":false,"url":"https://api.github.com/repos/RebirthDB/rebirthdb-python","forks_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/forks","keys_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/teams","hooks_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/hooks","issue_events_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues/events{/number}","events_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/events","assignees_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/assignees{/user}","branches_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/branches{/branch}","tags_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/tags","blobs_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/statuses/{sha}","languages_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/languages","stargazers_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/stargazers","contributors_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/contributors","subscribers_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/subscribers","subscription_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/subscription","commits_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/contents/{+path}","compare_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/merges","archive_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/downloads","issues_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues{/number}","pulls_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls{/number}","milestones_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/milestones{/number}","notifications_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/labels{/name}","releases_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/releases{/id}","deployments_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/deployments","created_at":"2018-05-23T15:58:14Z","updated_at":"2018-08-21T07:41:27Z","pushed_at":"2018-08-21T07:41:29Z","git_url":"git://github.com/RebirthDB/rebirthdb-python.git","ssh_url":"git@github.com:RebirthDB/rebirthdb-python.git","clone_url":"https://github.com/RebirthDB/rebirthdb-python.git","svn_url":"https://github.com/RebirthDB/rebirthdb-python","homepage":"","size":2096,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3,"open_issues":11,"watchers":5,"default_branch":"master"}},"base":{"label":"RebirthDB:master","ref":"master","sha":"55e512a204f7660a0fa183830feaa9aad3dec4c5","user":{"login":"RebirthDB","id":39274861,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5Mjc0ODYx","avatar_url":"https://avatars1.githubusercontent.com/u/39274861?v=4","gravatar_id":"","url":"https://api.github.com/users/RebirthDB","html_url":"https://github.com/RebirthDB","followers_url":"https://api.github.com/users/RebirthDB/followers","following_url":"https://api.github.com/users/RebirthDB/following{/other_user}","gists_url":"https://api.github.com/users/RebirthDB/gists{/gist_id}","starred_url":"https://api.github.com/users/RebirthDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RebirthDB/subscriptions","organizations_url":"https://api.github.com/users/RebirthDB/orgs","repos_url":"https://api.github.com/users/RebirthDB/repos","events_url":"https://api.github.com/users/RebirthDB/events{/privacy}","received_events_url":"https://api.github.com/users/RebirthDB/received_events","type":"Organization","site_admin":false},"repo":{"id":134593743,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQ1OTM3NDM=","name":"rebirthdb-python","full_name":"RebirthDB/rebirthdb-python","owner":{"login":"RebirthDB","id":39274861,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM5Mjc0ODYx","avatar_url":"https://avatars1.githubusercontent.com/u/39274861?v=4","gravatar_id":"","url":"https://api.github.com/users/RebirthDB","html_url":"https://github.com/RebirthDB","followers_url":"https://api.github.com/users/RebirthDB/followers","following_url":"https://api.github.com/users/RebirthDB/following{/other_user}","gists_url":"https://api.github.com/users/RebirthDB/gists{/gist_id}","starred_url":"https://api.github.com/users/RebirthDB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RebirthDB/subscriptions","organizations_url":"https://api.github.com/users/RebirthDB/orgs","repos_url":"https://api.github.com/users/RebirthDB/repos","events_url":"https://api.github.com/users/RebirthDB/events{/privacy}","received_events_url":"https://api.github.com/users/RebirthDB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RebirthDB/rebirthdb-python","description":"Python driver for RebirthDB","fork":false,"url":"https://api.github.com/repos/RebirthDB/rebirthdb-python","forks_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/forks","keys_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/teams","hooks_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/hooks","issue_events_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues/events{/number}","events_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/events","assignees_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/assignees{/user}","branches_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/branches{/branch}","tags_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/tags","blobs_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/statuses/{sha}","languages_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/languages","stargazers_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/stargazers","contributors_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/contributors","subscribers_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/subscribers","subscription_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/subscription","commits_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/contents/{+path}","compare_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/merges","archive_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/downloads","issues_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues{/number}","pulls_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls{/number}","milestones_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/milestones{/number}","notifications_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/labels{/name}","releases_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/releases{/id}","deployments_url":"https://api.github.com/repos/RebirthDB/rebirthdb-python/deployments","created_at":"2018-05-23T15:58:14Z","updated_at":"2018-08-21T07:41:27Z","pushed_at":"2018-08-21T07:41:29Z","git_url":"git://github.com/RebirthDB/rebirthdb-python.git","ssh_url":"git@github.com:RebirthDB/rebirthdb-python.git","clone_url":"https://github.com/RebirthDB/rebirthdb-python.git","svn_url":"https://github.com/RebirthDB/rebirthdb-python","homepage":"","size":2096,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3,"open_issues":11,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/33"},"html":{"href":"https://github.com/RebirthDB/rebirthdb-python/pull/33"},"issue":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues/33"},"comments":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/RebirthDB/rebirthdb-python/statuses/8af08a90c802214f23cf1f6c0883a80f147629f3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gabor-boros"}}