~/talk

Testing Django Applications with pytest

TalkinItalianat DjangoVillage 2015 · 2015-04-17..04-19· [testing, django]
links:none on file
slides:none on file

Shows how to run Django tests using pytest and the pytest-django plugin, using helpers like the test client and factory to assert a homepage returns HTTP 200 and a fixture that creates a Question object then checks Question.objects.count. Explains pytest markers (django_db, skip, xfail) and parametrize for repeated cases, and covers speeding tests with pytest-xdist (e.g. -n4) and reuse_db to avoid recreating test databases.

AI-written summary · about

  1. 0:00Introduction
  2. 1:08Testing Django apps
  3. 3:38pytest discovery in Django
  4. 5:13Exception testing
  5. 6:17Markers for control
  6. 8:04Custom test discovery
  7. 9:26Fixtures for setup
  8. 12:14Running tests in parallel
  9. 14:03Database reuse
  10. 16:09Marking DB access
  11. 19:17Creating fixtures
  12. 22:09Django pytest helpers
  13. 25:22Advanced pytest features
  14. 29:15Learning resources
  15. 35:43Q&A
~/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.