ibo-CI: test_extract_link.py -> check_extract_link.py (manuelles Skript, kein pytest-Test)
Some checks failed
Momentrum CI / Version (aus PR-ID / SHA) (push) Successful in 2s
Momentrum CI / Test (compile + pytest) (push) Successful in 19s
Momentrum CI / Helm lint + template (push) Successful in 9s
Momentrum CI / Build & Push image (push) Failing after 6s
Momentrum CI / Deploy PROD (Image-Tag -> CD-Repo) (push) Has been skipped

pytest sammelte die Funktion test_extract(email,token) faelschlich als Test ein
(fixture 'email' not found). Umbenannt in ein klar erkennbares Hilfsskript, damit
der CI-Guard 'ls test_*.py' sauberer skippt.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
timu 2026-07-18 02:35:42 +02:00
parent c54485dd6f
commit 5b2334ce79

View File

@ -1,9 +1,9 @@
#!/usr/bin/env python3
"""
Test-Script: Mail abrufen und Link extrahieren.
Hilfsskript (manuell, KEIN pytest-Test): Mail abrufen und Link extrahieren.
Verwendung:
python test_extract_link.py eg5gyqjqp5@web-library.net TOKEN_HIER
python check_extract_link.py eg5gyqjqp5@web-library.net TOKEN_HIER
oder: Token aus app.py Step 1 Tabelle kopieren
"""
@ -13,7 +13,7 @@ import json
from mailtm import list_messages, get_message_html
from core import extract_form_link
def test_extract(email, token):
def run_extract(email, token):
print(f"📧 Abrufen von Mails fuer: {email}")
print(f"🔑 Token: {token[:20]}...")
print()
@ -59,12 +59,12 @@ def test_extract(email, token):
if __name__ == "__main__":
if len(sys.argv) < 3:
print("Verwendung:")
print(" python test_extract_link.py EMAIL TOKEN")
print(" python check_extract_link.py EMAIL TOKEN")
print()
print("Beispiel:")
print(" python test_extract_link.py eg5gyqjqp5@web-library.net abc123xyz...")
print(" python check_extract_link.py eg5gyqjqp5@web-library.net abc123xyz...")
sys.exit(1)
email = sys.argv[1]
token = sys.argv[2]
test_extract(email, token)
run_extract(email, token)