Ship it · Project 2

Make it
ship: tickets.py

Fix the real file until every test passes. The tests run in your browser, so nothing you type leaves this page.

Project 2 · Trusted Data API

Northwind's AI layer posts tickets through this trust boundary. Bad payloads must die here — empty owners, unknown priorities, extra fields, and wrong types never reach Postgres. Fix validate_ticket until every test passes.

0 of 5 parts built. The tests check the same ideas.

What the tests check

  1. ·Accepts a clean ticket
  2. ·Rejects an empty or missing owner
  3. ·Rejects a blank title
  4. ·Rejects an unknown priority
  5. ·Rejects unexpected fields
  6. ·Rejects wrong types
  7. ·Names the field that failed
tickets.py
First load takes a few seconds.