~/talk

Secrets of the testing masters

Talkat DjangoCon AU 2013 · on Friday, 2013-07-05· [testing]
slides:none on file

Shows that Django fixtures often turn into 18-line JSON blobs because the default user model has about 12 required fields, and recommends replacing repeated fixtures with Factory Boy factories that declare defaults once, support sequence fields, lazy attributes, subfactories, and build vs create. Demonstrates overriding create to hash passwords, and using mock.patch and mock objects to fake external calls (example: forcing requests.get to return a 401 body "bad login") so tests run fast and reliably.

AI-written summary · about

  1. 0:00Introduction to testing
  2. 2:04The problem with fixtures
  3. 5:56Factory Boy for test data
  4. 15:17Challenges of external services
  5. 18:03Using mock for isolation
  6. 23:26Questions and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.