Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Unittest AsyncMock
Search
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
28
Fullstack Engineering Mistakes to Avoid
bottlejammy
0
56
Other Decks in Technology
See All in Technology
21st ACRi Webinar - Univ of Tokyo Presentation Slide (Shinya Takamaeda)
nao_sumikawa
0
120
Security Diaries of an Open Source IAM
ahus1
0
130
生成AI時代の自動E2Eテスト運用とPlaywright実践知_引持力哉
legalontechnologies
PRO
0
210
学習データって増やせばいいんですか?
ftakahashi
1
220
Oracle Technology Night #95 GoldenGate 26ai の実装に迫る1
oracle4engineer
PRO
0
150
形式手法特論:CEGAR を用いたモデル検査の状態空間削減 #kernelvm / Kernel VM Study Hokuriku Part 8
ytaka23
2
440
コミューンのデータ分析AIエージェント「Community Sage」の紹介
fufufukakaka
0
440
21st ACRi Webinar - Univ of Tokyo Presentation Slide (Ayumi Ohno)
nao_sumikawa
0
130
「Managed Instances」と「durable functions」で広がるAWS Lambdaのユースケース
lamaglama39
0
260
品質のための共通認識
kakehashi
PRO
3
210
多様なデジタルアイデンティティを攻撃からどうやって守るのか / 20251212
ayokura
0
250
モダンデータスタック (MDS) の話とデータ分析が起こすビジネス変革
sutotakeshi
0
410
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
The Language of Interfaces
destraynor
162
25k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
A better future with KSS
kneath
240
18k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Designing for humans not robots
tammielis
254
26k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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!