{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments/119420301","pull_request_review_id":41292551,"id":119420301,"diff_hunk":"@@ -16,6 +16,65 @@\n import unittest\n \n \n+class Test___mutate_rows_request(unittest.TestCase):\n+\n+    def _call_fut(self, table_name, rows):\n+        from google.cloud.bigtable.table import _mutate_rows_request\n+\n+        return _mutate_rows_request(table_name, rows)\n+\n+    def test__mutate_rows_too_many_mutations(self):\n+        from collections import namedtuple\n+        from google.cloud.bigtable._generated.data_pb2 import Mutation\n+        from google.cloud.bigtable.row import DirectRow\n+        import google.cloud.bigtable.table as table_module\n+        from google.cloud.bigtable.table import TooManyMutationsError\n+\n+        table = namedtuple('Table', ['name'])\n+        table.name = 'table'\n+        table_module._MAX_BULK_MUTATIONS = 3\n+        mutation = Mutation()\n+        rows = [DirectRow(row_key=b'row_key', table=table),\n+                DirectRow(row_key=b'row_key_2', table=table)]\n+        rows[0]._pb_mutations = [mutation, mutation]\n+        rows[1]._pb_mutations = [mutation, mutation]\n+        with self.assertRaises(TooManyMutationsError):\n+            self._call_fut('table', rows)\n+\n+\n+class Test__check_row_table_name(unittest.TestCase):\n+\n+    def _call_fut(self, table_name, row):\n+        from google.cloud.bigtable.table import _check_row_table_name\n+\n+        return _check_row_table_name(table_name, row)\n+\n+    def test__check_rows_wrong_table_name(self):\n+        from collections import namedtuple\n+        from google.cloud.bigtable.table import TableMismatchError\n+        from google.cloud.bigtable.row import DirectRow\n+\n+        table = namedtuple('Table', ['name'])\n+        table.name = 'table'\n+        row = DirectRow(row_key=b'row_key', table=table)\n+        with self.assertRaises(TableMismatchError):\n+            self._call_fut('other_table', row)\n+\n+\n+class Test__check_row_type(unittest.TestCase):\n+    def _call_fut(self, table_name, row):\n+        from google.cloud.bigtable.table import _check_row_type\n+\n+        return _check_row_type(table_name, row)\n+\n+    def test__check_rows_wrong_row_type(self):\n+        from google.cloud.bigtable.row import ConditionalRow\n+\n+        row = ConditionalRow(row_key=b'row_key', table='table', filter_=None)\n+        with self.assertRaises(TypeError):\n+            self._call_fut('table', row)","path":"bigtable/tests/unit/test_table.py","position":60,"original_position":60,"commit_id":"8cbf1cd36d32fc0e00445743f8a3e25954afca38","original_commit_id":"8cbf1cd36d32fc0e00445743f8a3e25954afca38","user":{"login":"dhermes","id":520669,"avatar_url":"https://avatars0.githubusercontent.com/u/520669?v=3","gravatar_id":"","url":"https://api.github.com/users/dhermes","html_url":"https://github.com/dhermes","followers_url":"https://api.github.com/users/dhermes/followers","following_url":"https://api.github.com/users/dhermes/following{/other_user}","gists_url":"https://api.github.com/users/dhermes/gists{/gist_id}","starred_url":"https://api.github.com/users/dhermes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhermes/subscriptions","organizations_url":"https://api.github.com/users/dhermes/orgs","repos_url":"https://api.github.com/users/dhermes/repos","events_url":"https://api.github.com/users/dhermes/events{/privacy}","received_events_url":"https://api.github.com/users/dhermes/received_events","type":"User","site_admin":false},"body":"You also need a test case that doesn't fail","created_at":"2017-05-31T17:24:01Z","updated_at":"2017-05-31T17:56:08Z","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/3401#discussion_r119420301","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/3401","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/comments/119420301"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/3401#discussion_r119420301"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/3401"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/3401","id":120160017,"html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/3401","diff_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/3401.diff","patch_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/3401.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3401","number":3401,"state":"open","locked":false,"title":"Bigtable records bulk update (MutateRows RPC call)","user":{"login":"skyfox","id":1127655,"avatar_url":"https://avatars0.githubusercontent.com/u/1127655?v=3","gravatar_id":"","url":"https://api.github.com/users/skyfox","html_url":"https://github.com/skyfox","followers_url":"https://api.github.com/users/skyfox/followers","following_url":"https://api.github.com/users/skyfox/following{/other_user}","gists_url":"https://api.github.com/users/skyfox/gists{/gist_id}","starred_url":"https://api.github.com/users/skyfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyfox/subscriptions","organizations_url":"https://api.github.com/users/skyfox/orgs","repos_url":"https://api.github.com/users/skyfox/repos","events_url":"https://api.github.com/users/skyfox/events{/privacy}","received_events_url":"https://api.github.com/users/skyfox/received_events","type":"User","site_admin":false},"body":"Implementation of bulk updates for DirectRow (MutateRows RPC call)","created_at":"2017-05-11T17:26:28Z","updated_at":"2017-05-31T17:56:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b02a56a3e4939592832840224575b729130ef13","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/3401/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/3401/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/3401/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/8cbf1cd36d32fc0e00445743f8a3e25954afca38","head":{"label":"skyfox:master","ref":"master","sha":"8cbf1cd36d32fc0e00445743f8a3e25954afca38","user":{"login":"skyfox","id":1127655,"avatar_url":"https://avatars0.githubusercontent.com/u/1127655?v=3","gravatar_id":"","url":"https://api.github.com/users/skyfox","html_url":"https://github.com/skyfox","followers_url":"https://api.github.com/users/skyfox/followers","following_url":"https://api.github.com/users/skyfox/following{/other_user}","gists_url":"https://api.github.com/users/skyfox/gists{/gist_id}","starred_url":"https://api.github.com/users/skyfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyfox/subscriptions","organizations_url":"https://api.github.com/users/skyfox/orgs","repos_url":"https://api.github.com/users/skyfox/repos","events_url":"https://api.github.com/users/skyfox/events{/privacy}","received_events_url":"https://api.github.com/users/skyfox/received_events","type":"User","site_admin":false},"repo":{"id":86049290,"name":"google-cloud-python","full_name":"skyfox/google-cloud-python","owner":{"login":"skyfox","id":1127655,"avatar_url":"https://avatars0.githubusercontent.com/u/1127655?v=3","gravatar_id":"","url":"https://api.github.com/users/skyfox","html_url":"https://github.com/skyfox","followers_url":"https://api.github.com/users/skyfox/followers","following_url":"https://api.github.com/users/skyfox/following{/other_user}","gists_url":"https://api.github.com/users/skyfox/gists{/gist_id}","starred_url":"https://api.github.com/users/skyfox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyfox/subscriptions","organizations_url":"https://api.github.com/users/skyfox/orgs","repos_url":"https://api.github.com/users/skyfox/repos","events_url":"https://api.github.com/users/skyfox/events{/privacy}","received_events_url":"https://api.github.com/users/skyfox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skyfox/google-cloud-python","description":"Google Cloud Client Library for Python","fork":true,"url":"https://api.github.com/repos/skyfox/google-cloud-python","forks_url":"https://api.github.com/repos/skyfox/google-cloud-python/forks","keys_url":"https://api.github.com/repos/skyfox/google-cloud-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skyfox/google-cloud-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skyfox/google-cloud-python/teams","hooks_url":"https://api.github.com/repos/skyfox/google-cloud-python/hooks","issue_events_url":"https://api.github.com/repos/skyfox/google-cloud-python/issues/events{/number}","events_url":"https://api.github.com/repos/skyfox/google-cloud-python/events","assignees_url":"https://api.github.com/repos/skyfox/google-cloud-python/assignees{/user}","branches_url":"https://api.github.com/repos/skyfox/google-cloud-python/branches{/branch}","tags_url":"https://api.github.com/repos/skyfox/google-cloud-python/tags","blobs_url":"https://api.github.com/repos/skyfox/google-cloud-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skyfox/google-cloud-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skyfox/google-cloud-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/skyfox/google-cloud-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skyfox/google-cloud-python/statuses/{sha}","languages_url":"https://api.github.com/repos/skyfox/google-cloud-python/languages","stargazers_url":"https://api.github.com/repos/skyfox/google-cloud-python/stargazers","contributors_url":"https://api.github.com/repos/skyfox/google-cloud-python/contributors","subscribers_url":"https://api.github.com/repos/skyfox/google-cloud-python/subscribers","subscription_url":"https://api.github.com/repos/skyfox/google-cloud-python/subscription","commits_url":"https://api.github.com/repos/skyfox/google-cloud-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/skyfox/google-cloud-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/skyfox/google-cloud-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/skyfox/google-cloud-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/skyfox/google-cloud-python/contents/{+path}","compare_url":"https://api.github.com/repos/skyfox/google-cloud-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skyfox/google-cloud-python/merges","archive_url":"https://api.github.com/repos/skyfox/google-cloud-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skyfox/google-cloud-python/downloads","issues_url":"https://api.github.com/repos/skyfox/google-cloud-python/issues{/number}","pulls_url":"https://api.github.com/repos/skyfox/google-cloud-python/pulls{/number}","milestones_url":"https://api.github.com/repos/skyfox/google-cloud-python/milestones{/number}","notifications_url":"https://api.github.com/repos/skyfox/google-cloud-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skyfox/google-cloud-python/labels{/name}","releases_url":"https://api.github.com/repos/skyfox/google-cloud-python/releases{/id}","deployments_url":"https://api.github.com/repos/skyfox/google-cloud-python/deployments","created_at":"2017-03-24T09:16:05Z","updated_at":"2017-03-24T09:16:09Z","pushed_at":"2017-05-26T11:24:56Z","git_url":"git://github.com/skyfox/google-cloud-python.git","ssh_url":"git@github.com:skyfox/google-cloud-python.git","clone_url":"https://github.com/skyfox/google-cloud-python.git","svn_url":"https://github.com/skyfox/google-cloud-python","homepage":"https://googlecloudplatform.github.io/google-cloud-python/","size":118025,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:master","ref":"master","sha":"4f584931c4e2abe60d80fa7a51ef4c6ee662874b","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars3.githubusercontent.com/u/2810941?v=3","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,"name":"google-cloud-python","full_name":"GoogleCloudPlatform/google-cloud-python","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars3.githubusercontent.com/u/2810941?v=3","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":"2017-05-30T19:22:37Z","pushed_at":"2017-05-31T17:54:10Z","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":121906,"stargazers_count":717,"watchers_count":717,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":354,"mirror_url":null,"open_issues_count":252,"forks":354,"open_issues":252,"watchers":717,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/3401"},"html":{"href":"https://github.com/GoogleCloudPlatform/google-cloud-python/pull/3401"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3401"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3401/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/pulls/3401/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/3401/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/statuses/8cbf1cd36d32fc0e00445743f8a3e25954afca38"}}}}
{"actor":{"display_login":"dhermes"}}