Created
February 17, 2022 23:57
-
-
Save henriquebastos/3fd2892a73c82a1b19c60d485c33a561 to your computer and use it in GitHub Desktop.
Demonstração do uso de fixtures com httpretty.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
@pytest.fixture | |
def httpretty(allow_net_connect=False, verbose=False): | |
import httpretty | |
httpretty.reset() | |
httpretty.enable(allow_net_connect=allow_net_connect, verbose=verbose) | |
yield httpretty | |
httpretty.disable() | |
httpretty.reset() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment