import sys
import os
import inspect
from unittest.mock import MagicMock

# Add the project root to the python path
sys.path.append(os.path.abspath(os.path.dirname(__file__)))

# Mock firebase module
sys.modules["firebase"] = MagicMock()
sys.modules["firebase.firebase"] = MagicMock()

try:
    from utility.googleCustomerMatch import GoogleCustomerMatch
    # We need to get the actual service class to inspect it.
    # Since we can't easily instantiate the client without creds, 
    # we might need to rely on what we can see or try to import the service directly if we knew the path.
    # But GoogleCustomerMatch imports GoogleAdsClient.
    from google.ads.googleads.client import GoogleAdsClient
    
    print("Successfully imported GoogleAdsClient")
    
    # Try to find where OfflineUserDataJobServiceClient is
    # It's usually dynamically generated.
    # Let's try to see if we can inspect it via a dummy client if possible, 
    # or just check the installed package version.
    import google.ads.googleads
    print(f"Google Ads Version: {google.ads.googleads.__version__}")
    
except ImportError as e:
    print(f"Failed to import: {e}")
    sys.exit(1)
