Skip to content

Commit ec09d67

Browse files
committed
remove dead test code
1 parent 8f3f6e3 commit ec09d67

File tree

2 files changed

+2
-53
lines changed

2 files changed

+2
-53
lines changed

tests/unit/test_client.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3775,23 +3775,6 @@ def test_load_table_from_uri_w_default_load_config(self):
37753775
timeout=DEFAULT_TIMEOUT,
37763776
)
37773777

3778-
@staticmethod
3779-
def _mock_requests_response(status_code, headers, content=b""):
3780-
return mock.Mock(
3781-
content=content,
3782-
headers=headers,
3783-
status_code=status_code,
3784-
spec=["content", "headers", "status_code"],
3785-
)
3786-
3787-
def _mock_transport(self, status_code, headers, content=b""):
3788-
fake_transport = mock.Mock(spec=["request"])
3789-
fake_response = self._mock_requests_response(
3790-
status_code, headers, content=content
3791-
)
3792-
fake_transport.request.return_value = fake_response
3793-
return fake_transport
3794-
37953778
def test_copy_table(self):
37963779
from google.cloud.bigquery.job import CopyJob
37973780

@@ -9669,38 +9652,6 @@ def test_load_table_from_json_unicode_emoji_data_case(self):
96699652
assert sent_data_file.getvalue() == expected_bytes
96709653

96719654
# Low-level tests
9672-
9673-
@classmethod
9674-
def _make_resumable_upload_responses(cls, size):
9675-
"""Make a series of responses for a successful resumable upload."""
9676-
from google import resumable_media
9677-
9678-
resumable_url = "http://test.invalid?upload_id=and-then-there-was-1"
9679-
initial_response = cls._make_response(
9680-
http.client.OK, "", {"location": resumable_url}
9681-
)
9682-
data_response = cls._make_response(
9683-
resumable_media.PERMANENT_REDIRECT,
9684-
"",
9685-
{"range": "bytes=0-{:d}".format(size - 1)},
9686-
)
9687-
final_response = cls._make_response(
9688-
http.client.OK,
9689-
json.dumps({"size": size}),
9690-
{"Content-Type": "application/json"},
9691-
)
9692-
return [initial_response, data_response, final_response]
9693-
9694-
@staticmethod
9695-
def _make_transport(responses=None):
9696-
import google.auth.transport.requests
9697-
9698-
transport = mock.create_autospec(
9699-
google.auth.transport.requests.AuthorizedSession, instance=True
9700-
)
9701-
transport.request.side_effect = responses
9702-
return transport
9703-
97049655
def test_schema_from_json_with_file_object(self):
97059656
from google.cloud.bigquery.schema import SchemaField
97069657

tests/unit/test_client_resumable_media_upload.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,8 @@ def _make_credentials():
5454
def _make_client(*args, **kw):
5555
from google.cloud.bigquery.client import Client
5656

57-
if "credentials" not in kw:
58-
kw["credentials"] = _make_credentials()
59-
if "project" not in kw:
60-
kw["project"] = PROJECT
57+
kw["credentials"] = _make_credentials()
58+
kw["project"] = PROJECT
6159
return Client(*args, **kw)
6260

6361

0 commit comments

Comments
 (0)