Skip to content
Myr

test_hooks.py

This file

Path

tests/test_hooks.py

22 lines · 424 bytes · Python

Last changed by

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

History of this file

Take it

The walk stopped after 200 commits: lines older than 1f7c888 point at it.

Merge pull request #5570 from ajorg-aws/masterNate Prewittbefore adoption1f7c888

lines 1–10why, one step back
1import pytest
23from requests import hooks456def hook(value):7 return value[1:]8910@pytest.mark.parametrize(

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

lines 11–15why, one step back
11 "hooks_list, result",
12 (13 (hook, "ata"),14 ([hook, lambda x: None, hook], "ta"),15 ),

Merge pull request #5570 from ajorg-aws/masterNate Prewittbefore adoption1f7c888

lines 16–17why, one step back
16)
17def test_hooks(hooks_list, result):

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

line 18why, one step back
18 assert hooks.dispatch_hook("response", {"response": hooks_list}, "Data") == result

Merge pull request #5570 from ajorg-aws/masterNate Prewittbefore adoption1f7c888

lines 19–21why, one step back
19
2021def test_default_hooks():

Add automatic code formatting to Requests (#6095)Nate Prewittbefore adoption2a6f290

line 22why, one step back
22 assert hooks.default_hooks() == {"response": []}