Skip to content
This repository was archived by the owner on Dec 31, 2023. 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
20 changes: 8 additions & 12 deletions samples/noxfile_config.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
TEST_CONFIG_OVERRIDE = {
# You can opt out from the test for specific Python versions.
"ignored_versions": ["2.7"],
# Old samples are opted out of enforcing Python type hints
# All new samples should feature them
"enforce_type_hints": True,
# An envvar key for determining the project id to use. Change it
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
# build specific Cloud project. You can also use your own string
# to use your own Cloud project.
"gcloud_project_env": "GOOGLE_CLOUD_PROJECT",
"gcloud_project_env": "BUILD_SPECIFIC_GCLOUD_PROJECT",
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
# A dictionary you want to inject into your test. Don't put any
# secrets here. These values will override predefined values.
"envs": {
"GA_TEST_PROPERTY_ID": "222596558",
"GA_TEST_ACCOUNT_ID": "123",
"GA_TEST_USER_LINK_ID": "123",
"GA_TEST_ANDROID_APP_DATA_STREAM_ID": "123",
"GA_TEST_IOS_APP_DATA_STREAM_ID": "123",
"GA_TEST_WEB_DATA_STREAM_ID": "123",
"GA_TEST_PROPERTY_ID": "276206997",
"GA_TEST_ACCOUNT_ID": "199820965",
"GA_TEST_USER_LINK_ID": "103401743041912607932",
"GA_TEST_PROPERTY_USER_LINK_ID": "105231969274497648555",
"GA_TEST_ANDROID_APP_DATA_STREAM_ID": "2828100949",
"GA_TEST_IOS_APP_DATA_STREAM_ID": "2828089289",
"GA_TEST_WEB_DATA_STREAM_ID": "2828068992",
},
}
5 changes: 1 addition & 4 deletions samples/properties_firebase_links_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ def create_firebase_link(property_id, firebase_project_id):
client = AnalyticsAdminServiceClient()
firebase_link = client.create_firebase_link(
parent=f"properties/{property_id}",
firebase_link=FirebaseLink(
project=f"projects/{firebase_project_id}",
maximum_user_access="READ_AND_ANALYZE",
),
firebase_link=FirebaseLink(project=f"projects/{firebase_project_id}"),
)

print("Result:")
Expand Down
5 changes: 0 additions & 5 deletions samples/properties_firebase_links_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"""
# [START analyticsadmin_properties_firebase_links_list]
from google.analytics.admin import AnalyticsAdminServiceClient
from google.analytics.admin_v1alpha.types import MaximumUserAccess


def run_sample():
Expand All @@ -49,10 +48,6 @@ def print_firebase_link(firebase_link):
"""Prints the Firebase link details."""
print(f"Resource name: {firebase_link.name}")
print(f"Firebase project: {firebase_link.project}")
print(
f"Maximum user access to the GA4 property: "
f"{MaximumUserAccess(firebase_link.maximum_user_access).name}"
)
print(f"Create time: {firebase_link.create_time}")


Expand Down
71 changes: 0 additions & 71 deletions samples/properties_firebase_links_update.py

This file was deleted.

30 changes: 0 additions & 30 deletions samples/properties_firebase_links_update_test.py

This file was deleted.

2 changes: 1 addition & 1 deletion samples/properties_google_ads_links_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def print_google_ads_link(google_ads_link):
print(f"Google Ads customer ID: {google_ads_link.customer_id}")
print(f"Can manage clients: {google_ads_link.can_manage_clients}")
print(f"Ads personalization enabled: {google_ads_link.ads_personalization_enabled}")
print(f"Email address of the link creator: {google_ads_link.email_address}")
print(f"Email address of the link creator: {google_ads_link.creator_email_address}")
print(f"Create time: {google_ads_link.create_time}")
print(f"Update time: {google_ads_link.update_time}")

Expand Down
2 changes: 1 addition & 1 deletion samples/properties_google_ads_links_list_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
TEST_PROPERTY_ID = os.getenv("GA_TEST_PROPERTY_ID")


def test_properties_firebase_links_list(capsys):
def test_properties_google_ads_links_list(capsys):
properties_google_ads_links_list.list_google_ads_links(TEST_PROPERTY_ID)
out, _ = capsys.readouterr()
assert "Result" in out
2 changes: 1 addition & 1 deletion samples/properties_ios_app_data_streams_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def print_ios_app_data_stream(ios_app_data_stream):
print(f"Resource name: {ios_app_data_stream.name}")
print(f"Display name: {ios_app_data_stream.display_name}")
print(f"Firebase app ID: {ios_app_data_stream.firebase_app_id}")
print(f"Bundle ID: {ios_app_data_stream.bundleId}")
print(f"Bundle ID: {ios_app_data_stream.bundle_id}")
print(f"Create time: {ios_app_data_stream.create_time}")
print(f"Update time: {ios_app_data_stream.update_time}")

Expand Down
2 changes: 1 addition & 1 deletion samples/properties_user_links_batch_get_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import properties_user_links_batch_get

TEST_PROPERTY_ID = os.getenv("GA_TEST_PROPERTY_ID")
TEST_USER_LINK_ID = os.getenv("GA_USER_LINK_ID")
TEST_USER_LINK_ID = os.getenv("GA_TEST_PROPERTY_USER_LINK_ID")


def test_properties_user_links_batch_get(capsys):
Expand Down
2 changes: 1 addition & 1 deletion samples/properties_user_links_get_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import properties_user_links_get

TEST_PROPERTY_ID = os.getenv("GA_TEST_PROPERTY_ID")
TEST_USER_LINK_ID = os.getenv("GA_USER_LINK_ID")
TEST_USER_LINK_ID = os.getenv("GA_TEST_PROPERTY_USER_LINK_ID")


def test_properties_user_links_get(capsys):
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading