~/talk

3 ways to test S3 in Python

Talkat PyConline AU 2020 · 2020-09-04..09-06· [testing, devops-and-delivery]
links:none on file
slides:none on file

A tiny 20-line CRUD app stores recipes in S3 and tests run three ways: botocore stubs, moto, and LocalStack. Botocore stubs work but prove fragile and verbose; tests require brittle fake responses. Moto and LocalStack both implement the S3 API, let tests run unchanged, and actually catch bugs seen in production. Recommendation: use moto for pure Python projects, use LocalStack when a more realistic, cross-language environment or heavier IO testing is needed. Tests reach ~100% coverage for the example.

AI-written summary · about

  1. 0:00Testing S3 in Python
  2. 2:31Why S3 testing matters
  3. 4:36BottleCore stubs limits
  4. 11:00Moto for S3 mocking
  5. 15:30LocalStack for AWS testing
  6. 18:17Moto vs LocalStack
  7. 20:21Bugs caught by S3 tests
  8. 22:51Choosing Moto or LocalStack
  9. 23:12Q&A
~/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.