Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Unittest AsyncMock
Search
Pranay Suresh
February 05, 2020
Technology
240
0
Share
Unittest AsyncMock
Talk about how to mock async methods in different versions of Python
Pranay Suresh
February 05, 2020
More Decks by Pranay Suresh
See All by Pranay Suresh
Event Driven Architecture
bottlejammy
0
31
Fullstack Engineering Mistakes to Avoid
bottlejammy
0
59
Other Decks in Technology
See All in Technology
DIPS2.0データに基づく森林管理における無人航空機の利用状況
naokimuroki
0
190
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
380
Zero Data Loss Autonomous Recovery Service サービス概要
oracle4engineer
PRO
5
14k
Hooks, Filters & Now Context: Why MCPs Are the “Hooks” of the AI Era
miriamschwab
0
130
Kubernetes基盤における開発者体験 とセキュリティの両⽴ / Balancing developer experience and security in a Kubernetes-based environment
chmikata
0
240
AI時代に新卒採用、はじめました/junior-engineer-never-die
dmnlk
0
240
Discordでリモートポケカしてたら、なぜかDOを25分間動かせるようになった話
umireon
0
120
仕様通り動くの先へ。Claude Codeで「使える」を検証する
gotalab555
8
3.2k
Digitization部 紹介資料
sansan33
PRO
1
7.2k
新規サービス開発におけるReact Nativeのリアル〜技術選定の裏側と実践的OSS活用〜
grandbig
2
180
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
74k
AI環境整備はどのくらい開発生産性を変えうるか? #AI駆動開発 #AI自走環境
ucchi0909
0
120
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
170
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
From π to Pie charts
rasagy
0
160
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
170
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
220
Bash Introduction
62gerente
615
210k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
670
Transcript
Unittest AsyncMock https://pranaysuresh.com/ https://www.linkedin.com/in/pranaysuresh/
None
None
Because...
Prior to Python 3.8 Option 1: Custom solution
Prior to Python 3.8
Prior to Python 3.8 Option 2: asynctest library: https://pypi.org/project/asynctest/
Python 3.8
None
Other features: assert_awaited, assert_awaited_once, assert_awaited_with, await_count etc etc.
Other features: Mock iterators
Other features: Mock context managers
Thank You!