refactor: [30388f42] Strukturiere Root-Skripte thematisch neu
- Organisiert eine Vielzahl von Skripten aus dem Root-Verzeichnis in thematische Unterordner, um die Übersichtlichkeit zu verbessern und die Migration vorzubereiten. - Verschiebt SuperOffice-bezogene Test- und Hilfsskripte in . - Verschiebt Notion-bezogene Synchronisations- und Import-Skripte in . - Archiviert eindeutig veraltete und ungenutzte Skripte in . - Die zentralen Helfer und bleiben im Root, da sie von mehreren Tools als Abhängigkeit genutzt werden.
This commit is contained in:
34
ARCHIVE_legacy_scripts/test_export.py
Normal file
34
ARCHIVE_legacy_scripts/test_export.py
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
import requests
|
||||
import os
|
||||
|
||||
def test_export_endpoint():
|
||||
# The app runs on port 8000 inside the container.
|
||||
# The root_path is /ce, so the full URL is http://localhost:8000/ce/api/companies/export
|
||||
url = "http://localhost:8000/ce/api/companies/export"
|
||||
|
||||
print(f"--- Testing Export Endpoint: GET {url} ---")
|
||||
|
||||
try:
|
||||
response = requests.get(url)
|
||||
response.raise_for_status() # Will raise an exception for 4xx/5xx errors
|
||||
|
||||
# Print the first few hundred characters to verify content
|
||||
print("\n--- Response Headers ---")
|
||||
print(response.headers)
|
||||
|
||||
print("\n--- CSV Output (first 500 chars) ---")
|
||||
print(response.text[:500])
|
||||
|
||||
# A simple check
|
||||
if "Metric Value" in response.text and "Source URL" in response.text:
|
||||
print("\n[SUCCESS] New columns found in export.")
|
||||
else:
|
||||
print("\n[FAILURE] New columns seem to be missing from the export.")
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"\n[FAILURE] Could not connect to the endpoint: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_export_endpoint()
|
||||
|
||||
Reference in New Issue
Block a user