Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,16 @@ async def run_report(

from google.analytics import data_v1beta

def sample_run_report():
async def sample_run_report():
# Create a client
client = data_v1beta.BetaAnalyticsDataClient()
client = data_v1beta.BetaAnalyticsDataAsyncClient()

# Initialize request argument(s)
request = data_v1beta.RunReportRequest(
)

# Make the request
response = client.run_report(request=request)
response = await client.run_report(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -300,16 +300,16 @@ async def run_pivot_report(

from google.analytics import data_v1beta

def sample_run_pivot_report():
async def sample_run_pivot_report():
# Create a client
client = data_v1beta.BetaAnalyticsDataClient()
client = data_v1beta.BetaAnalyticsDataAsyncClient()

# Initialize request argument(s)
request = data_v1beta.RunPivotReportRequest(
)

# Make the request
response = client.run_pivot_report(request=request)
response = await client.run_pivot_report(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -373,16 +373,16 @@ async def batch_run_reports(

from google.analytics import data_v1beta

def sample_batch_run_reports():
async def sample_batch_run_reports():
# Create a client
client = data_v1beta.BetaAnalyticsDataClient()
client = data_v1beta.BetaAnalyticsDataAsyncClient()

# Initialize request argument(s)
request = data_v1beta.BatchRunReportsRequest(
)

# Make the request
response = client.batch_run_reports(request=request)
response = await client.batch_run_reports(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -446,16 +446,16 @@ async def batch_run_pivot_reports(

from google.analytics import data_v1beta

def sample_batch_run_pivot_reports():
async def sample_batch_run_pivot_reports():
# Create a client
client = data_v1beta.BetaAnalyticsDataClient()
client = data_v1beta.BetaAnalyticsDataAsyncClient()

# Initialize request argument(s)
request = data_v1beta.BatchRunPivotReportsRequest(
)

# Make the request
response = client.batch_run_pivot_reports(request=request)
response = await client.batch_run_pivot_reports(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -529,17 +529,17 @@ async def get_metadata(

from google.analytics import data_v1beta

def sample_get_metadata():
async def sample_get_metadata():
# Create a client
client = data_v1beta.BetaAnalyticsDataClient()
client = data_v1beta.BetaAnalyticsDataAsyncClient()

# Initialize request argument(s)
request = data_v1beta.GetMetadataRequest(
name="name_value",
)

# Make the request
response = client.get_metadata(request=request)
response = await client.get_metadata(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -636,16 +636,16 @@ async def run_realtime_report(

from google.analytics import data_v1beta

def sample_run_realtime_report():
async def sample_run_realtime_report():
# Create a client
client = data_v1beta.BetaAnalyticsDataClient()
client = data_v1beta.BetaAnalyticsDataAsyncClient()

# Initialize request argument(s)
request = data_v1beta.RunRealtimeReportRequest(
)

# Make the request
response = client.run_realtime_report(request=request)
response = await client.run_realtime_report(request=request)

# Handle the response
print(response)
Expand Down Expand Up @@ -718,16 +718,16 @@ async def check_compatibility(

from google.analytics import data_v1beta

def sample_check_compatibility():
async def sample_check_compatibility():
# Create a client
client = data_v1beta.BetaAnalyticsDataClient()
client = data_v1beta.BetaAnalyticsDataAsyncClient()

# Initialize request argument(s)
request = data_v1beta.CheckCompatibilityRequest(
)

# Make the request
response = client.check_compatibility(request=request)
response = await client.check_compatibility(request=request)

# Handle the response
print(response)
Expand Down
56 changes: 28 additions & 28 deletions tests/unit/gapic/data_v1beta/test_beta_analytics_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ def test_run_report_field_headers():
# a field header. Set these to a non-empty value.
request = analytics_data_api.RunReportRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.run_report), "__call__") as call:
Expand All @@ -785,7 +785,7 @@ def test_run_report_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand All @@ -799,7 +799,7 @@ async def test_run_report_field_headers_async():
# a field header. Set these to a non-empty value.
request = analytics_data_api.RunReportRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.run_report), "__call__") as call:
Expand All @@ -817,7 +817,7 @@ async def test_run_report_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand Down Expand Up @@ -920,7 +920,7 @@ def test_run_pivot_report_field_headers():
# a field header. Set these to a non-empty value.
request = analytics_data_api.RunPivotReportRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.run_pivot_report), "__call__") as call:
Expand All @@ -936,7 +936,7 @@ def test_run_pivot_report_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand All @@ -950,7 +950,7 @@ async def test_run_pivot_report_field_headers_async():
# a field header. Set these to a non-empty value.
request = analytics_data_api.RunPivotReportRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.run_pivot_report), "__call__") as call:
Expand All @@ -968,7 +968,7 @@ async def test_run_pivot_report_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1077,7 +1077,7 @@ def test_batch_run_reports_field_headers():
# a field header. Set these to a non-empty value.
request = analytics_data_api.BatchRunReportsRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
Expand All @@ -1095,7 +1095,7 @@ def test_batch_run_reports_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand All @@ -1109,7 +1109,7 @@ async def test_batch_run_reports_field_headers_async():
# a field header. Set these to a non-empty value.
request = analytics_data_api.BatchRunReportsRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
Expand All @@ -1129,7 +1129,7 @@ async def test_batch_run_reports_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1238,7 +1238,7 @@ def test_batch_run_pivot_reports_field_headers():
# a field header. Set these to a non-empty value.
request = analytics_data_api.BatchRunPivotReportsRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
Expand All @@ -1256,7 +1256,7 @@ def test_batch_run_pivot_reports_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand All @@ -1270,7 +1270,7 @@ async def test_batch_run_pivot_reports_field_headers_async():
# a field header. Set these to a non-empty value.
request = analytics_data_api.BatchRunPivotReportsRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
Expand All @@ -1290,7 +1290,7 @@ async def test_batch_run_pivot_reports_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1392,7 +1392,7 @@ def test_get_metadata_field_headers():
# a field header. Set these to a non-empty value.
request = analytics_data_api.GetMetadataRequest()

request.name = "name/value"
request.name = "name_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.get_metadata), "__call__") as call:
Expand All @@ -1408,7 +1408,7 @@ def test_get_metadata_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand All @@ -1422,7 +1422,7 @@ async def test_get_metadata_field_headers_async():
# a field header. Set these to a non-empty value.
request = analytics_data_api.GetMetadataRequest()

request.name = "name/value"
request.name = "name_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(type(client.transport.get_metadata), "__call__") as call:
Expand All @@ -1440,7 +1440,7 @@ async def test_get_metadata_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"name=name/value",
"name=name_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1635,7 +1635,7 @@ def test_run_realtime_report_field_headers():
# a field header. Set these to a non-empty value.
request = analytics_data_api.RunRealtimeReportRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
Expand All @@ -1653,7 +1653,7 @@ def test_run_realtime_report_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand All @@ -1667,7 +1667,7 @@ async def test_run_realtime_report_field_headers_async():
# a field header. Set these to a non-empty value.
request = analytics_data_api.RunRealtimeReportRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
Expand All @@ -1687,7 +1687,7 @@ async def test_run_realtime_report_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand Down Expand Up @@ -1790,7 +1790,7 @@ def test_check_compatibility_field_headers():
# a field header. Set these to a non-empty value.
request = analytics_data_api.CheckCompatibilityRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
Expand All @@ -1808,7 +1808,7 @@ def test_check_compatibility_field_headers():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand All @@ -1822,7 +1822,7 @@ async def test_check_compatibility_field_headers_async():
# a field header. Set these to a non-empty value.
request = analytics_data_api.CheckCompatibilityRequest()

request.property = "property/value"
request.property = "property_value"

# Mock the actual call within the gRPC stub, and fake the request.
with mock.patch.object(
Expand All @@ -1842,7 +1842,7 @@ async def test_check_compatibility_field_headers_async():
_, _, kw = call.mock_calls[0]
assert (
"x-goog-request-params",
"property=property/value",
"property=property_value",
) in kw["metadata"]


Expand Down