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
180
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
16
Fullstack Engineering Mistakes to Avoid
bottlejammy
0
40
Other Decks in Technology
See All in Technology
独自ツール開発でスタジオ撮影をDX!「VLS(Virtual LED Studio)」 / dx-studio-vls
cyberagentdevelopers
PRO
0
110
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
1
370
Databricksワークショップ - 生成AIとDWH
taka_aki
2
4.5k
Mobbing Practices
kawaguti
PRO
3
340
Figma Dev Modeで進化するデザインとエンジニアリングの協働 / figma-with-engineering
cyberagentdevelopers
PRO
1
340
都市伝説バスターズ「WebアプリのボトルネックはDBだから言語の性能は関係ない」 - Kaigi on Rails 2024
osyoyu
13
4.8k
分布で見る効果検証入門 / ai-distributional-effect
cyberagentdevelopers
PRO
2
550
クラシルの現在とこれから
am1157154
1
340
日経ビジュアルデータにおける スクロールテリングと地図/nikkei-tech-talk-26
nikkei_engineer_recruiting
0
160
EKS初心者が早めに知っておきたかったこと
cuorain
0
140
サイバーエージェントにおける生成AIのリスキリング施策の取り組み / cyber-ai-reskilling
cyberagentdevelopers
PRO
1
130
Capybara+生成AIでどこまで本当に自然言語のテストを書けるか?
yusukeiwaki
6
1.1k
Featured
See All Featured
Unsuck your backbone
ammeep
668
57k
A Philosophy of Restraint
colly
203
16k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Thoughts on Productivity
jonyablonski
67
4.3k
How GitHub (no longer) Works
holman
311
140k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
770
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Optimizing for Happiness
mojombo
376
69k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Fireside Chat
paigeccino
32
3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
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!