Commit c544c1bd6a
Verified · cmc
Layout: unified · split
tests/test_ingestion.py +5 −3
| @@ -237,13 +237,15 @@ def branch_payload(*branches: str) -> dict: | ||
| 237 | 237 | |
| 238 | 238 | def test_todo_ingestion_is_idempotent(db_session) -> None: |
| 239 | 239 | settings = make_settings() |
| 240 | # The poller polls the last 30 days, so keep fixture events inside that window. | |
| 241 | now = datetime.now(tz=UTC) | |
| 240 | 242 | payload = { |
| 241 | 243 | "me": {"canonicalName": "~ccleberg"}, |
| 242 | 244 | "events": { |
| 243 | 245 | "results": [ |
| 244 | 246 | { |
| 245 | 247 | "id": "1001", |
| 246 | "created": "2026-05-01T10:00:00Z", | |
| 248 | "created": (now - timedelta(days=3)).isoformat(), | |
| 247 | 249 | "ticket": { |
| 248 | 250 | "id": "123", |
| 249 | 251 | "ref": "~ccleberg/todo/123", |
| @@ -262,7 +264,7 @@ def test_todo_ingestion_is_idempotent(db_session) -> None: | ||
| 262 | 264 | }, |
| 263 | 265 | { |
| 264 | 266 | "id": "1002", |
| 265 | "created": "2026-05-02T09:00:00Z", | |
| 267 | "created": (now - timedelta(days=2, hours=1)).isoformat(), | |
| 266 | 268 | "ticket": { |
| 267 | 269 | "id": "123", |
| 268 | 270 | "ref": "~ccleberg/todo/123", |
| @@ -281,7 +283,7 @@ def test_todo_ingestion_is_idempotent(db_session) -> None: | ||
| 281 | 283 | }, |
| 282 | 284 | { |
| 283 | 285 | "id": "1003", |
| 284 | "created": "2026-05-02T10:00:00Z", | |
| 286 | "created": (now - timedelta(days=2)).isoformat(), | |
| 285 | 287 | "ticket": { |
| 286 | 288 | "id": "123", |
| 287 | 289 | "ref": "~ccleberg/todo/123", |