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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Pranay Suresh
February 05, 2020
Technology
0
230
Unittest AsyncMock
Talk about how to mock async methods in different versions of Python
Pranay Suresh
February 05, 2020
Tweet
Share
More Decks by Pranay Suresh
See All by Pranay Suresh
Event Driven Architecture
bottlejammy
0
30
Fullstack Engineering Mistakes to Avoid
bottlejammy
0
56
Other Decks in Technology
See All in Technology
【Oracle Cloud ウェビナー】[Oracle AI Database + AWS] Oracle Database@AWSで広がるクラウドの新たな選択肢とAI時代のデータ戦略
oracle4engineer
PRO
2
170
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
クレジットカード決済基盤を支えるSRE - 厳格な監査とSRE運用の両立 (SRE Kaigi 2026)
capytan
6
2.8k
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
340
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
200
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.5k
今日から始めるAmazon Bedrock AgentCore
har1101
4
410
プロポーザルに込める段取り八分
shoheimitani
1
390
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
620
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.5k
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
1.9k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
A Modern Web Designer's Workflow
chriscoyier
698
190k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
67
Documentation Writing (for coders)
carmenintech
77
5.3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
220
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Navigating Team Friction
lara
192
16k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
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!