Not ready to merge as it stands, but close: the structure is clean (small single-purpose functions, parameterised SQL, connection always closed), and four small fixes would get it there. I only read `export_job.py`; I did not run it or open `test_export_job.py`.

**Fix before merging**

1. **A failed export looks like a success to cron.** `run()` catches every exception, logs one line and returns normally (`export_job.py:56-57`), so the process exits with code 0.
   - Example: the finance endpoint returns a 503 at 02:00. The job exits 0, no alert fires, and finance has no file for that day.
   - Fix: use `log.exception(...)` and re-raise (or `sys.exit(1)`) so the failure is visible and has a traceback.

2. **A missed day cannot be re-run.** The date is always "yesterday" (`:47`), so once fix 1 tells you a night failed, the only way to recover is to edit the code. An optional date argument, defaulting to yesterday, fixes this.

3. **Every customer email is written to the log.** Line 52 logs the full list of `customer_email` values each night. Log the count and the day only.

4. **The upload can hang forever.** `requests.post` has no timeout (`:42`). If the finance endpoint accepts the connection and never responds, the job never finishes and never fails. Add `timeout=(10, 120)` or similar.

**Check, may be fine**

- **Success logs are probably going nowhere.** Nothing configures logging, so when run as a script the `log.info` lines are dropped and only errors reach stderr. Add `logging.basicConfig(level=logging.INFO)` under `__main__` unless cron wraps this in something that configures it.
- **"Yesterday" depends on the server and database time zones.** `date.today()` uses the server's local time, and the `paid_at` comparison uses the database session's zone. If `paid_at` is timezone-aware and finance's day is not the server's day, an invoice paid at 23:30 finance-time can land in the next day's file. Worth confirming which day boundary finance expects.
- **Amount formatting varies.** `amount_cents / 100` writes 1010 cents as `10.1` and 1000 as `10.0`. The values are right; if finance's importer expects two decimals, use `f"{amount_cents / 100:.2f}"`. Zero-decimal currencies such as JPY would also be divided by 100, if you have any.

**Tests**

The docstring says the tests cover the CSV header and one row. Given the fixes above, I'd add three before merging:
- `run()` exits non-zero when the upload fails.
- `fetch_invoices` uses the right day boundaries: 00:00 is included, the next day's 00:00 is excluded.
- The date argument overrides "yesterday".

`UPLOAD_URL` is read at import time (`:16`), so importing the module in tests needs that environment variable set. Moving the lookup into `upload()` removes that.

All of this is about an hour of work, so merging tomorrow is realistic.

VERDICT: READY WITH CHANGES
