~/talk

Testing Django

Talkat PyCon Ukraine 2014 · 2014-11-01..11-02· [ruby]
links:none on file
slides:none on file

Recommends avoid fixtures and use Factory Boy to build or create model instances with sequences and subfactories, showing a PostFactory that auto-creates an author; prefers use WebTest not Selenium for faster functional tests (no JS/Ajax, not a headless browser) and webtest-django helpers for auth and headers like X-Requested-With or JWT. Advocates small, dumb tests, keep tests simple and repeat rather than loops or logic, use eager Celery for tests, and notes ~300 tests run ~30s locally vs ~5min on Postgres.

AI-written summary · about

  1. 0:00Introduction to Django testing
  2. 1:05Avoiding fixtures in tests
  3. 2:33Using Factory Boy for data
  4. 4:47WebTest for functional tests
  5. 8:45Testing API endpoints
  6. 13:27Keeping tests simple
  7. 16:00Avoiding mocks in tests
  8. 17:10No logic in tests
  9. 18:37One test per scenario
  10. 20:00Testing non-Django frameworks
  11. 21:06Avoid testing views
  12. 22:50Test execution speed
  13. 24:14Testing as black box
  14. 25:37Minimize test logic
  15. 26:18Async tasks in tests
  16. 27:02Pragmatic testing approach
  17. 29:32TDD as methodology
  18. 30:36Team testing agreement
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.