{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments/191925133","pull_request_review_id":124595847,"id":191925133,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MTkyNTEzMw==","diff_hunk":"@@ -589,6 +589,101 @@ def test_sample_row_keys(self):\n         result = table.sample_row_keys()\n         self.assertEqual(result[0], expected_result)\n \n+    def test_truncate(self):\n+        from google.cloud.bigtable_v2.gapic import bigtable_client\n+        from google.cloud.bigtable_admin_v2.gapic import (\n+            bigtable_table_admin_client)\n+\n+        data_api = bigtable_client.BigtableClient(mock.Mock())\n+        table_api = bigtable_table_admin_client.BigtableTableAdminClient(\n+            mock.Mock())\n+        credentials = _make_credentials()\n+        client = self._make_client(project='project-id',\n+                                   credentials=credentials, admin=True)\n+        client._table_data_client = data_api\n+        client._table_admin_client = table_api\n+        instance = client.instance(instance_id=self.INSTANCE_ID)\n+        table = self._make_one(self.TABLE_ID, instance)\n+\n+        expected_result = None  # truncate() has no return value.\n+\n+        result = table.truncate()\n+\n+        self.assertEqual(result, expected_result)","path":"bigtable/tests/unit/test_table.py","position":24,"original_position":24,"commit_id":"02dc65706b2e741262a33186b3a266956f8f5287","original_commit_id":"02dc65706b2e741262a33186b3a266956f8f5287","user":{"login":"sduskis","id":99305,"node_id":"MDQ6VXNlcjk5MzA1","avatar_url":"https://avatars3.githubusercontent.com/u/99305?v=4","gravatar_id":"","url":"https://api.github.com/users/sduskis","html_url":"https://github.com/sduskis","followers_url":"https://api.github.com/users/sduskis/followers","following_url":"https://api.github.com/users/sduskis/following{/other_user}","gists_url":"https://api.github.com/users/sduskis/gists{/gist_id}","starred_url":"https://api.github.com/users/sduskis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sduskis/subscriptions","organizations_url":"https://api.github.com/users/sduskis/orgs","repos_url":"https://api.github.com/users/sduskis/repos","events_url":"https://api.github.com/users/sduskis/events{/privacy}","received_events_url":"https://api.github.com/users/sduskis/received_events","type":"User","site_admin":false},"body":"We need to make sure that the proto object that we expect is actually sent.  Is there a way to do that in unit tests?","created_at":"2018-05-30T21:14:23Z","updated_at":"2018-05-30T21:14:23Z","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5360#discussion_r191925133","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5360","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments/191925133"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5360#discussion_r191925133"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5360"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5360","id":189634181,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5NjM0MTgx","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5360","diff_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5360.diff","patch_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5360.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5360","number":5360,"state":"open","locked":false,"title":"BigTable: Add truncate table and drop by prefix on top of GAPIC integration","user":{"login":"aneepct","id":12858460,"node_id":"MDQ6VXNlcjEyODU4NDYw","avatar_url":"https://avatars2.githubusercontent.com/u/12858460?v=4","gravatar_id":"","url":"https://api.github.com/users/aneepct","html_url":"https://github.com/aneepct","followers_url":"https://api.github.com/users/aneepct/followers","following_url":"https://api.github.com/users/aneepct/following{/other_user}","gists_url":"https://api.github.com/users/aneepct/gists{/gist_id}","starred_url":"https://api.github.com/users/aneepct/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aneepct/subscriptions","organizations_url":"https://api.github.com/users/aneepct/orgs","repos_url":"https://api.github.com/users/aneepct/repos","events_url":"https://api.github.com/users/aneepct/events{/privacy}","received_events_url":"https://api.github.com/users/aneepct/received_events","type":"User","site_admin":false},"body":"Add methods on Table to delete rows by prefix and truncate all rows.\r\n1. truncate\r\n2. drop_by_prefix","created_at":"2018-05-22T11:42:55Z","updated_at":"2018-05-30T21:14:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6133dfb37bee06722a39831fc964910517f33a5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"lukesneeringer","id":4346,"node_id":"MDQ6VXNlcjQzNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/4346?v=4","gravatar_id":"","url":"https://api.github.com/users/lukesneeringer","html_url":"https://github.com/lukesneeringer","followers_url":"https://api.github.com/users/lukesneeringer/followers","following_url":"https://api.github.com/users/lukesneeringer/following{/other_user}","gists_url":"https://api.github.com/users/lukesneeringer/gists{/gist_id}","starred_url":"https://api.github.com/users/lukesneeringer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukesneeringer/subscriptions","organizations_url":"https://api.github.com/users/lukesneeringer/orgs","repos_url":"https://api.github.com/users/lukesneeringer/repos","events_url":"https://api.github.com/users/lukesneeringer/events{/privacy}","received_events_url":"https://api.github.com/users/lukesneeringer/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":210703442,"node_id":"MDU6TGFiZWwyMTA3MDM0NDI=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/api:%20bigtable","name":"api: bigtable","color":"f8f8f8","default":false},{"id":131682747,"node_id":"MDU6TGFiZWwxMzE2ODI3NDc=","url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/cla:%20yes","name":"cla: yes","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5360/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5360/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5360/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/02dc65706b2e741262a33186b3a266956f8f5287","head":{"label":"zakons:feature/add_truncate_table_and_drop_by_prefix","ref":"feature/add_truncate_table_and_drop_by_prefix","sha":"02dc65706b2e741262a33186b3a266956f8f5287","user":{"login":"zakons","id":3955026,"node_id":"MDQ6VXNlcjM5NTUwMjY=","avatar_url":"https://avatars0.githubusercontent.com/u/3955026?v=4","gravatar_id":"","url":"https://api.github.com/users/zakons","html_url":"https://github.com/zakons","followers_url":"https://api.github.com/users/zakons/followers","following_url":"https://api.github.com/users/zakons/following{/other_user}","gists_url":"https://api.github.com/users/zakons/gists{/gist_id}","starred_url":"https://api.github.com/users/zakons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zakons/subscriptions","organizations_url":"https://api.github.com/users/zakons/orgs","repos_url":"https://api.github.com/users/zakons/repos","events_url":"https://api.github.com/users/zakons/events{/privacy}","received_events_url":"https://api.github.com/users/zakons/received_events","type":"User","site_admin":false},"repo":{"id":113809823,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM4MDk4MjM=","name":"google-cloud-python","full_name":"zakons/google-cloud-python","owner":{"login":"zakons","id":3955026,"node_id":"MDQ6VXNlcjM5NTUwMjY=","avatar_url":"https://avatars0.githubusercontent.com/u/3955026?v=4","gravatar_id":"","url":"https://api.github.com/users/zakons","html_url":"https://github.com/zakons","followers_url":"https://api.github.com/users/zakons/followers","following_url":"https://api.github.com/users/zakons/following{/other_user}","gists_url":"https://api.github.com/users/zakons/gists{/gist_id}","starred_url":"https://api.github.com/users/zakons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zakons/subscriptions","organizations_url":"https://api.github.com/users/zakons/orgs","repos_url":"https://api.github.com/users/zakons/repos","events_url":"https://api.github.com/users/zakons/events{/privacy}","received_events_url":"https://api.github.com/users/zakons/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zakons/google-cloud-python","description":"Google Cloud Client Library for Python","fork":true,"url":"https://api.github.com/repos/zakons/google-cloud-python","forks_url":"https://api.github.com/repos/zakons/google-cloud-python/forks","keys_url":"https://api.github.com/repos/zakons/google-cloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zakons/google-cloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zakons/google-cloud-python/teams","hooks_url":"https://api.github.com/repos/zakons/google-cloud-python/hooks","issue_events_url":"https://api.github.com/repos/zakons/google-cloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/zakons/google-cloud-python/events","assignees_url":"https://api.github.com/repos/zakons/google-cloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/zakons/google-cloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/zakons/google-cloud-python/tags","blobs_url":"https://api.github.com/repos/zakons/google-cloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zakons/google-cloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zakons/google-cloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/zakons/google-cloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zakons/google-cloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/zakons/google-cloud-python/languages","stargazers_url":"https://api.github.com/repos/zakons/google-cloud-python/stargazers","contributors_url":"https://api.github.com/repos/zakons/google-cloud-python/contributors","subscribers_url":"https://api.github.com/repos/zakons/google-cloud-python/subscribers","subscription_url":"https://api.github.com/repos/zakons/google-cloud-python/subscription","commits_url":"https://api.github.com/repos/zakons/google-cloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/zakons/google-cloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/zakons/google-cloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/zakons/google-cloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/zakons/google-cloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/zakons/google-cloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zakons/google-cloud-python/merges","archive_url":"https://api.github.com/repos/zakons/google-cloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zakons/google-cloud-python/downloads","issues_url":"https://api.github.com/repos/zakons/google-cloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/zakons/google-cloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/zakons/google-cloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/zakons/google-cloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zakons/google-cloud-python/labels{/name}","releases_url":"https://api.github.com/repos/zakons/google-cloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/zakons/google-cloud-python/deployments","created_at":"2017-12-11T03:54:39Z","updated_at":"2018-05-30T02:43:45Z","pushed_at":"2018-05-30T11:53:12Z","git_url":"git://github.com/zakons/google-cloud-python.git","ssh_url":"git@github.com:zakons/google-cloud-python.git","clone_url":"https://github.com/zakons/google-cloud-python.git","svn_url":"https://github.com/zakons/google-cloud-python","homepage":"https://googlecloudplatform.github.io/google-cloud-python/","size":145646,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"GoogleCloudPlatform:master","ref":"master","sha":"c1fa3b697788027b78ad8d0fcfecebb30d6a0d8b","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":16316451,"node_id":"MDEwOlJlcG9zaXRvcnkxNjMxNjQ1MQ==","name":"google-cloud-python","full_name":"GoogleCloudPlatform/google-cloud-python","owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python","description":"Google Cloud Client Library for Python","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/deployments","created_at":"2014-01-28T15:51:47Z","updated_at":"2018-05-30T20:33:17Z","pushed_at":"2018-05-30T21:05:43Z","git_url":"git://github.com/GoogleCloudPlatform/google-cloud-python.git","ssh_url":"git@github.com:GoogleCloudPlatform/google-cloud-python.git","clone_url":"https://github.com/GoogleCloudPlatform/google-cloud-python.git","svn_url":"https://github.com/GoogleCloudPlatform/google-cloud-python","homepage":"https://googlecloudplatform.github.io/google-cloud-python/","size":176200,"stargazers_count":1498,"watchers_count":1498,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":654,"mirror_url":null,"archived":false,"open_issues_count":110,"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":654,"open_issues":110,"watchers":1498,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5360"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/5360"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5360"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/5360/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5360/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/5360/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/02dc65706b2e741262a33186b3a266956f8f5287"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sduskis"}}