~/talk

For those about to Mock I salute you!

Talkat PyOhio 2016 · 2016-07-30..07-31· [testing]
links:none on file
slides:none on file

Covers concrete recipes: uses unittest and pytest for assertions and parametrized runs, shows replacing external dependencies with stubs (namedtuple), magic mocks and patching to assert calls, and using mock.side_effect to raise errors or iterate return values. Demonstrates mocking built-ins like open with BytesIO, testing requests by patching request.session, and recording/playback of real HTTP responses with betamax cassettes; also shows API workflow testing with gabbi.

AI-written summary · about

  1. 0:00Introduction
  2. 1:00Why I test
  3. 2:00Tools
  4. 2:30Unit Tests
  5. 4:03Setting up Unit Tests
  6. 5:45Testing Vocabulary
  7. 8:20Unit Test
  8. 8:49Run
  9. 9:03Results
  10. 9:48stub
  11. 10:23JSON
  12. 10:51MagicMock
  13. 13:34Exception Handling
  14. 14:01Value Error
  15. 15:43Blow up JSON
  16. 17:50Mock
  17. 31:57Betamax
  18. 34:22Test
  19. 37:31API endpoints
  20. 38:43Gaby
  21. 40:19Cheap tricks
  22. 42:26Parametrization
~/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.