Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: recipe_engine/third_party/requests/tests/test_hooks.py

Issue 2164713003: Vendor requests. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Fix deps.pyl Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # coding: utf-8
2 import pytest
3
4 from requests import hooks
5
6
7 def hook(value):
8 return value[1:]
9
10
11 @pytest.mark.parametrize(
12 'hooks_list, result', (
13 (hook, 'ata'),
14 ([hook, lambda x: None, hook], 'ta'),
15 )
16 )
17 def test_hooks(hooks_list, result):
18 assert hooks.dispatch_hook('response', {'response': hooks_list}, 'Data') == result
19
20
21 def test_default_hooks():
22 assert hooks.default_hooks() == {'response': []}
OLDNEW
« no previous file with comments | « recipe_engine/third_party/requests/tests/conftest.py ('k') | recipe_engine/third_party/requests/tests/test_lowlevel.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698