# Kommunikation Sync - Test Scripts Test-Scripts für die Kommunikation (Phone/Email/Fax) Synchronisation. ## Scripts ### test_kommunikation_api.py Vollständiger API-Test für Advoware Kommunikation-Endpoints. **Testet:** - POST /Kommunikationen (CREATE) - PUT /Kommunikationen (UPDATE) - DELETE /Kommunikationen (gibt 403 - erwartet) - kommKz-Werte (1-12) - Alle 4 Felder (tlf, bemerkung, kommKz, online) ### test_kommunikation_sync_implementation.py Test der bidirektionalen Sync-Implementierung. **Testet:** - 6 Sync-Varianten (Var1-6) - Base64-Marker System - Hash-basierte Change Detection - Empty Slots (DELETE-Workaround) - Konflikt-Handling ### test_kommunikation_matching_strategy.py Test verschiedener Matching-Strategien. **Testet:** - Base64-Marker Matching - Value-Matching für Initial Sync - kommKz Detection (4-Stufen) - Edge Cases ### test_kommunikation_kommkz_deep.py Deep-Dive Test für kommKz-Enum. **Testet:** - Alle 12 kommKz-Werte (TelGesch, Mobil, Email, etc.) - kommKz=0 Bug in GET (Advoware) - kommKz READ-ONLY bei PUT ### test_kommunikation_readonly.py Test für Read-Only Felder. **Testet:** - kommKz kann bei PUT nicht geändert werden - Workarounds für Type-Änderungen ### test_kommart_values.py Test für kommArt vs kommKz Unterschiede. ### verify_advoware_kommunikation_ids.py Verifiziert Kommunikation-IDs zwischen Systemen. ## Verwendung ```bash cd /opt/motia-app/bitbylaw python scripts/kommunikation_sync/test_kommunikation_api.py ``` ## Verwandte Dokumentation - [../../docs/SYNC_OVERVIEW.md](../../docs/SYNC_OVERVIEW.md#kommunikation-sync) - Vollständige Dokumentation - [../../services/kommunikation_sync_utils.py](../../services/kommunikation_sync_utils.py) - Implementierung