Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Pytest: Mocking - what?

  • Hard-coded path in code.
  • STDIN/STDOUT/STDERR.
  • External dependency (e.g. an API).
  • Random values.
  • Methods accessing a database.
  • Time.