Spaces:
Sleeping
Sleeping
| import pytest | |
| from fastapi.testclient import TestClient | |
| from app.main import app | |
| def client(): | |
| """Provide a FastAPI test client.""" | |
| return TestClient(app) | |
| def sample_daily_html(): | |
| """Minimal daily-newsletter HTML for templateify tests.""" | |
| return """<!DOCTYPE html><html><head></head><body> | |
| <table width="500" style="border-radius:8px"> | |
| <tr><td> | |
| <table width="100%" style="padding:24px 20px"> | |
| <tr><td> | |
| <p style="font-style:italic">January 1, 2025</p> | |
| <p class="top_p">Intro text here</p> | |
| </td></tr> | |
| </table> | |
| </td></tr> | |
| </table> | |
| </body></html>""" | |
| def sample_special_events_html(): | |
| """Minimal special-events HTML for templateify tests.""" | |
| return """<!DOCTYPE html><html><head></head><body> | |
| <div class="event_title"><h1>My Event</h1></div> | |
| <div class="event_intro"><p>Some intro</p></div> | |
| <div class="outro_text"><p>Some outro</p></div> | |
| </body></html>""" | |