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
0
220
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
18
Fullstack Engineering Mistakes to Avoid
bottlejammy
0
48
Other Decks in Technology
See All in Technology
OPENLOGI Company Profile for engineer
hr01
1
33k
FOSS4G 2025 KANSAI QGISで点群データをいろいろしてみた
kou_kita
0
190
20250625 Snowflake Summit 2025活用事例 レポート / Nowcast Snowflake Summit 2025 Case Study Report
kkuv
1
370
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
240
Lazy application authentication with Tailscale
bluehatbrit
0
100
使いたいMCPサーバーはWeb APIをラップして自分で作る #QiitaBash
bengo4com
0
1.2k
Core Audio tapを使ったリアルタイム音声処理のお話
yuta0306
0
150
Amazon Bedrockで実現する 新たな学習体験
kzkmaeda
2
680
Yamla: Rustでつくるリアルタイム性を追求した機械学習基盤 / Yamla: A Rust-Based Machine Learning Platform Pursuing Real-Time Capabilities
lycorptech_jp
PRO
4
170
PHP開発者のためのSOLID原則再入門 #phpcon / PHP Conference Japan 2025
shogogg
4
930
5min GuardDuty Extended Threat Detection EKS
takakuni
0
180
rubygem開発で鍛える設計力
joker1007
2
270
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
49
14k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.5k
Stop Working from a Prison Cell
hatefulcrawdad
270
20k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Facilitating Awesome Meetings
lara
54
6.4k
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.8k
Why Our Code Smells
bkeepers
PRO
337
57k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
Statistics for Hackers
jakevdp
799
220k
The Language of Interfaces
destraynor
158
25k
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!