Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Unittest AsyncMock
Search
Pranay Suresh
February 05, 2020
Technology
260
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Unittest AsyncMock
Talk about how to mock async methods in different versions of Python
Pranay Suresh
February 05, 2020
Transcript
13 slides
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!
More Decks by Pranay Suresh
See All by Pranay Suresh
Event Driven Architecture
bottlejammy
0
47
Fullstack Engineering Mistakes to Avoid
bottlejammy
0
77
Other Decks in Technology
See All in Technology
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
2
330
「AIチャットからもできないの?」と言われたら ~業務アプリをMCP対応するときの認証・認可の勘所
oidfj
0
330
AIネイティブ組織の作り方。1人のPOとAIから始める、自社での実験
ama_ch
1
470
これからのデータエンジニアの役割について考える / Rethinking the Role of Data Engineers in the AI Era
okiyuki99
0
490
速くなるほど、深く考える AI時代のQAに学ぶ
kobayashiyorimitsu
0
210
AWS基盤改善を支える 私たちの理念と行動指針
kentosuzuki
0
220
Where Should Platform Complexity Live? Lessons from a Cross-Team PR Preview Platform
taiki45
0
110
Gemma4 Hands-on at Nagoya
tsho
0
100
_マネジメントする人される人ナイト_2026__良いチームを作っていきたい_お気持ち_.pdf
xkxaxkx
0
390
AI時代における医療情報システムのセキュリティ / Security of Healthcare IT Systems in the AI Era
henryofficial
0
170
プロダクションコードにおける encoding/json から encoding/json/v2 へのスムーズな移行
sansantech
PRO
1
420
Steering と Hook (チームの決まりを守らせる) | 目指せ Kiro マスター 06
inariku
PRO
2
120
Featured
See All Featured
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
750
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
Building AI with AI
inesmontani
PRO
1
1.4k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.3k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
Balancing Empowerment & Direction
lara
6
1.4k
Visualization
eitanlees
153
17k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
530