~/talk

Mock, patch - when and how to use

Talkat 4Developers 2017 · on Monday, 2017-04-03· [testing, python]
links:none on file
slides:none on file

Covers Python unit-testing best practices, focusing on when and how to use mocking and patching via Python libraries (likely unittest.mock and related tools) to simplify test development. Includes concrete examples drawn from projects developed over the past few years.

AI-written summary · about

  1. 0:00Start
  2. 2:06Basic test
  3. 5:29Mock - assert usage
  4. 11:35Mock request.post
  5. 13:44Patch & imports
  6. 16:21Patch - nesting patches
  7. 17:59Patch - environment variables
~/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.