Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Unittest AsyncMock
Pranay Suresh
February 05, 2020
Technology
0
91
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
5
Fullstack Engineering Mistakes to Avoid
bottlejammy
0
22
Other Decks in Technology
See All in Technology
現状のFedCMの動作解説と OIDCとの親和性について- OpenID TechNight vol.19
ritou
2
450
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
3
9.1k
プログラマがオブジェクト指向しても幸せになれない理由
shirayanagiryuji
0
140
RDRA + JavaによるレジャーSaaSプロダクトの要件定義と実装のシームレスな接続
jjebejj
PRO
3
730
Azure Arc Virtual MachineとAzure Arc Resource Bridge / VM provisioning through Azure portal on Azure Stack HCI (preview)
sashizaki
0
150
UWBを使ってみた
norioikedo
0
430
DeepL の用語集が(いつのまにか)日本語に対応してたので試してみた
irokawah0
0
170
OpsJAWS Meetup21 システム運用アンチパターンのすすめ
yoshiiryo1
0
1.5k
HoloLens2とMetaQuest2どちらも動くWebXRアプリをBabylon.jsで作る
iwaken71
0
200
OPENLOGI Company Profile
hr01
0
530
Meet passkeys
satotakeshi
1
120
GeoLocationAnchor and MKTileOverlay
toyship
0
110
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
415
59k
Navigating Team Friction
lara
175
11k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
269
11k
YesSQL, Process and Tooling at Scale
rocio
157
12k
Raft: Consensus for Rubyists
vanstee
126
5.4k
Clear Off the Table
cherdarchuk
79
280k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
224
49k
Why Our Code Smells
bkeepers
PRO
324
55k
Art, The Web, and Tiny UX
lynnandtonic
280
17k
Music & Morning Musume
bryan
35
4.2k
From Idea to $5000 a Month in 5 Months
shpigford
373
44k
A Modern Web Designer's Workflow
chriscoyier
689
180k
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!