~/talk

Testing Your Python Code

links:none on file
slides:none on file

Shows concrete unit and integration examples that run without hardware: a regex validator for router names, a mocked netmiko SSH connector that asserts connect called with specific args, and an HTTP GET tested with requests-mock and a pytest fixture returning saved JSON. Uses pytest, unittest.mock autospec, netmiko, betamax, hypothesis and coverage. Presents templates for per-test setup/teardown and class-level integration setup/teardown, demonstrates tests passing and snapshots created/restored so workflows are verifiable without touching production.

AI-written summary · about

  1. 0:00Start
  2. 1:54Disclaimers
  3. 2:31Motivation: why test?
  4. 3:52Motivation: why test for network automation?
  5. 5:36Types of tests and network automation
  6. 6:37Unit testing
  7. 7:05Integration testing
  8. 7:50System testing
  9. 8:06Acceptance testing
  10. 20:11Unit Test Template
  11. 21:07Integration Tests
  12. 23:53Interop DIGITAL
~/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.