Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ branch = True
[report]
omit =
*/_generated/*.py
*/unit_tests/__init__.py
# Packages in the "google.cloud" package that we don't own.
*/google/cloud/gapic/*
fail_under = 100
show_missing = True
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def test_list_instances(self):
instance_pb2 as data_v2_pb2)
from google.cloud.bigtable._generated import (
bigtable_instance_admin_pb2 as messages_v2_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

LOCATION = 'projects/' + self.PROJECT + '/locations/locname'
FAILED_LOCATION = 'FAILED'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def test___ne__(self):
self.assertNotEqual(cluster1, cluster2)

def test_reload(self):
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.bigtable.cluster import DEFAULT_SERVE_NODES

SERVE_NODES = 31
Expand Down Expand Up @@ -232,7 +232,7 @@ def test_create(self):
from google.cloud.operation import Operation
from google.cloud.bigtable._generated import (
bigtable_instance_admin_pb2 as messages_v2_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

SERVE_NODES = 4
client = _Client(self.PROJECT)
Expand Down Expand Up @@ -281,7 +281,7 @@ def test_update(self):
instance_pb2 as data_v2_pb2)
from google.cloud.bigtable._generated import (
bigtable_instance_admin_pb2 as messages_v2_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.bigtable.cluster import _UPDATE_CLUSTER_METADATA_URL

NOW = datetime.datetime.utcnow()
Expand Down Expand Up @@ -339,7 +339,7 @@ def test_update(self):

def test_delete(self):
from google.protobuf import empty_pb2
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client(self.PROJECT)
instance = _Instance(self.INSTANCE_ID, client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def test_to_pb_with_rule(self):
def _create_test_helper(self, gc_rule=None):
from google.cloud.bigtable._generated import (
bigtable_table_admin_pb2 as table_admin_v2_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

project_id = 'project-id'
zone = 'zone'
Expand Down Expand Up @@ -465,7 +465,7 @@ def test_create_with_gc_rule(self):
self._create_test_helper(gc_rule=gc_rule)

def _update_test_helper(self, gc_rule=None):
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.bigtable._generated import (
bigtable_table_admin_pb2 as table_admin_v2_pb2)

Expand Down Expand Up @@ -526,7 +526,7 @@ def test_delete(self):
from google.protobuf import empty_pb2
from google.cloud.bigtable._generated import (
bigtable_table_admin_pb2 as table_admin_v2_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

project_id = 'project-id'
zone = 'zone'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def test_reload(self):
instance_pb2 as data_v2_pb2)
from google.cloud.bigtable._generated import (
bigtable_instance_admin_pb2 as messages_v2_pb)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client(self.PROJECT)
instance = self._makeOne(self.INSTANCE_ID, client, self.LOCATION_ID)
Expand Down Expand Up @@ -233,7 +233,7 @@ def test_create(self):
from google.cloud.bigtable._generated import (
bigtable_instance_admin_pb2 as messages_v2_pb2)
from google.cloud._helpers import _datetime_to_pb_timestamp
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.operation import Operation
from google.cloud.bigtable.cluster import DEFAULT_SERVE_NODES
from google.cloud.bigtable.instance import (
Expand Down Expand Up @@ -287,7 +287,7 @@ def test_create_w_explicit_serve_nodes(self):
from google.longrunning import operations_pb2
from google.cloud.bigtable._generated import (
bigtable_instance_admin_pb2 as messages_v2_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.operation import Operation

SERVE_NODES = 5
Expand Down Expand Up @@ -326,7 +326,7 @@ def test_create_w_explicit_serve_nodes(self):
def test_update(self):
from google.cloud.bigtable._generated import (
instance_pb2 as data_v2_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client(self.PROJECT)
instance = self._makeOne(self.INSTANCE_ID, client, self.LOCATION_ID,
Expand Down Expand Up @@ -361,7 +361,7 @@ def test_delete(self):
from google.protobuf import empty_pb2
from google.cloud.bigtable._generated import (
bigtable_instance_admin_pb2 as messages_v2_pb)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client(self.PROJECT)
instance = self._makeOne(self.INSTANCE_ID, client, self.LOCATION_ID)
Expand Down Expand Up @@ -394,7 +394,7 @@ def test_list_clusters(self):
instance_pb2 as instance_v2_pb2)
from google.cloud.bigtable._generated import (
bigtable_instance_admin_pb2 as messages_v2_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

FAILED_LOCATION = 'FAILED'
FAILED_LOCATIONS = [FAILED_LOCATION]
Expand Down Expand Up @@ -451,7 +451,7 @@ def _list_tables_helper(self, table_name=None):
table_pb2 as table_data_v2_pb2)
from google.cloud.bigtable._generated import (
bigtable_table_admin_pb2 as table_messages_v1_pb2)
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client(self.PROJECT)
instance = self._makeOne(self.INSTANCE_ID, client, self.LOCATION_ID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def test_delete_cells_with_string_columns(self):

def test_commit(self):
from google.protobuf import empty_pb2
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

row_key = b'row_key'
table_name = 'projects/more-stuff'
Expand Down Expand Up @@ -356,7 +356,7 @@ def test_commit_too_many_mutations(self):
row.commit()

def test_commit_no_mutations(self):
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

row_key = b'row_key'
client = _Client()
Expand Down Expand Up @@ -407,7 +407,7 @@ def test__get_mutations(self):
self.assertIs(false_mutations, row._get_mutations(None))

def test_commit(self):
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.bigtable.row_filters import RowSampleFilter

row_key = b'row_key'
Expand Down Expand Up @@ -495,7 +495,7 @@ def test_commit_too_many_mutations(self):
row.commit()

def test_commit_no_mutations(self):
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

row_key = b'row_key'
client = _Client()
Expand Down Expand Up @@ -573,7 +573,7 @@ def test_increment_cell_value(self):

def test_commit(self):
from google.cloud._testing import _Monkey
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.bigtable import row as MUT

row_key = b'row_key'
Expand Down Expand Up @@ -628,7 +628,7 @@ def mock_parse_rmw_row_response(row_response):
self.assertEqual(row._rule_pb_list, [])

def test_commit_no_rules(self):
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

row_key = b'row_key'
client = _Client()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test___ne__(self):

def _create_test_helper(self, initial_split_keys, column_families=()):
from google.cloud._helpers import _to_bytes
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client()
instance = _Instance(self.INSTANCE_NAME, client=client)
Expand Down Expand Up @@ -201,7 +201,7 @@ def test_create_with_column_families(self):
column_families=column_families)

def _list_column_families_helper(self):
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client()
instance = _Instance(self.INSTANCE_NAME, client=client)
Expand Down Expand Up @@ -239,7 +239,7 @@ def test_list_column_families(self):

def test_delete(self):
from google.protobuf import empty_pb2
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client()
instance = _Instance(self.INSTANCE_NAME, client=client)
Expand Down Expand Up @@ -268,7 +268,7 @@ def test_delete(self):

def _read_row_helper(self, chunks, expected_result):
from google.cloud._testing import _Monkey
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.bigtable import table as MUT

client = _Client()
Expand Down Expand Up @@ -348,7 +348,7 @@ def test_read_row_still_partial(self):

def test_read_rows(self):
from google.cloud._testing import _Monkey
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub
from google.cloud.bigtable.row_data import PartialRowsData
from google.cloud.bigtable import table as MUT

Expand Down Expand Up @@ -398,7 +398,7 @@ def mock_create_row_request(table_name, **kwargs):
self.assertEqual(mock_created, [(table.name, created_kwargs)])

def test_sample_row_keys(self):
from unit_tests._testing import _FakeStub
from unit_tests.bigtable._testing import _FakeStub

client = _Client()
instance = _Instance(self.INSTANCE_NAME, client=client)
Expand Down
13 changes: 13 additions & 0 deletions datastore/unit_tests/datastore/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions dns/unit_tests/dns/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions error_reporting/unit_tests/error_reporting/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions language/unit_tests/language/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions logging/unit_tests/logging/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions logging/unit_tests/logging/handlers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions logging/unit_tests/logging/handlers/transports/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions monitoring/unit_tests/monitoring/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
13 changes: 13 additions & 0 deletions pubsub/unit_tests/pubsub/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions resource_manager/unit_tests/resource_manager/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Loading