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 | def test_todo_ingestion_is_idempotent(db_session) -> None: | 238 | def test_todo_ingestion_is_idempotent(db_session) -> None: |
| 239 | settings = make_settings() | 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 | payload = { | 242 | payload = { |
| 241 | "me": {"canonicalName": "~ccleberg"}, | 243 | "me": {"canonicalName": "~ccleberg"}, |
| 242 | "events": { | 244 | "events": { |
| 243 | "results": [ | 245 | "results": [ |
| 244 | { | 246 | { |
| 245 | "id": "1001", | 247 | "id": "1001", |
| 246 | "created": "2026-05-01T10:00:00Z", | 248 | "created": (now - timedelta(days=3)).isoformat(), |
| 247 | "ticket": { | 249 | "ticket": { |
| 248 | "id": "123", | 250 | "id": "123", |
| 249 | "ref": "~ccleberg/todo/123", | 251 | "ref": "~ccleberg/todo/123", |
| @@ -262,7 +264,7 @@ def test_todo_ingestion_is_idempotent(db_session) -> None: | |||
| 262 | }, | 264 | }, |
| 263 | { | 265 | { |
| 264 | "id": "1002", | 266 | "id": "1002", |
| 265 | "created": "2026-05-02T09:00:00Z", | 267 | "created": (now - timedelta(days=2, hours=1)).isoformat(), |
| 266 | "ticket": { | 268 | "ticket": { |
| 267 | "id": "123", | 269 | "id": "123", |
| 268 | "ref": "~ccleberg/todo/123", | 270 | "ref": "~ccleberg/todo/123", |
| @@ -281,7 +283,7 @@ def test_todo_ingestion_is_idempotent(db_session) -> None: | |||
| 281 | }, | 283 | }, |
| 282 | { | 284 | { |
| 283 | "id": "1003", | 285 | "id": "1003", |
| 284 | "created": "2026-05-02T10:00:00Z", | 286 | "created": (now - timedelta(days=2)).isoformat(), |
| 285 | "ticket": { | 287 | "ticket": { |
| 286 | "id": "123", | 288 | "id": "123", |
| 287 | "ref": "~ccleberg/todo/123", | 289 | "ref": "~ccleberg/todo/123", |