#!/usr/bin/env python3 """ Script to fix authentication calls in test_voice_services.py """ import re # Read the file with open('test_voice_services.py', 'r', encoding='utf-8') as f: content = f.read() # Replace all get_test_headers() calls with get_test_headers(get_platform_token()) # But only for the ones that don't already have a token parameter pattern = r'get_test_headers\(\)' replacement = 'get_test_headers(get_platform_token())' # Apply the replacement new_content = re.sub(pattern, replacement, content) # Write the file back with open('test_voice_services.py', 'w', encoding='utf-8') as f: f.write(new_content) print("Fixed authentication calls in test_voice_services.py")