Not quite as it stands: the export logic itself is sound, but three small fixes should go in before the merge, the most important being that a failed export currently looks like a successful one. I read the file only; I did not run it or open `test_export_job.py`.

**Fix before merging**

1. **Failures are swallowed (`export_job.py:56-57`).** `run()` catches every exception, logs one line and returns normally, so the process exits 0. For example, if the finance endpoint returns a 503 at 02:00, cron records a successful run and finance has no file. Use `log.exception(...)` and then `raise`, so the exit code is non-zero and the traceback is kept.

2. **The upload has no timeout (`export_job.py:42`).** `requests.post` waits indefinitely by default. If the endpoint accepts the connection and never answers, the job hangs, holding its database connection open. Add something like `timeout=(10, 120)`.

3. **Customer emails are written to the log (`export_job.py:52`).** The info line includes every customer's email address for the day. Log the count and the day only. This line is silent today only because the script never configures logging, which is also why a successful run leaves no trace. Add `logging.basicConfig(level=logging.INFO)` under `__main__`.

**Worth doing, not blocking**

- **No way to re-run a missed day.** The day is hard-coded to yesterday (`export_job.py:47`). An optional date argument would make recovery from a failed night a one-line command.
- **Amount formatting is inconsistent (`export_job.py:37`).** 2000 cents is written as `20.0` and 1050 as `10.5`. The values are correct, but `f"{amount_cents / 100:.2f}"` gives finance a uniform `20.00`.
- **"Yesterday" depends on time zones.** It is the host's local date, and the midnight boundaries are in the database session's time zone. If either differs from finance's business day, invoices paid near midnight land in the neighbouring day's file. Nothing is lost or duplicated.
- **Importing the module requires `FINANCE_UPLOAD_URL` (`export_job.py:16`).** Reading it inside `upload()` would make the module importable in tests without that variable set.
- **Test coverage is thin.** By the docstring, tests cover the CSV header and one row. The date window in `fetch_invoices` and the failure path in `run()` are worth a test each, especially the one asserting that a failed upload raises.

**What is already right**

The query is parameterised with a half-open date range, so no invoice is double-counted or missed between days. The connection is always closed, and the functions are small and separately testable.

VERDICT: READY WITH CHANGES
