File size: 554 Bytes
dbcf976 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import os
import sys
from pathlib import Path
# Add src to path
sys.path.append(str(Path("e:/study/googleapi/1/google/src")))
# Mock environment variable
os.environ["API_KEY"] = "test_env_key_12345"
try:
from core.config import config
print(f"Current API Key: {config.api_key}")
if config.api_key == "test_env_key_12345":
print("SUCCESS: API Key read from environment variable.")
else:
print(f"FAILURE: Expected 'test_env_key_12345', got '{config.api_key}'")
except Exception as e:
print(f"ERROR: {e}")
|