Skip to content

Instantly share code, notes, and snippets.

@henriquebastos
Created February 17, 2022 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henriquebastos/3fd2892a73c82a1b19c60d485c33a561 to your computer and use it in GitHub Desktop.
Save henriquebastos/3fd2892a73c82a1b19c60d485c33a561 to your computer and use it in GitHub Desktop.
Demonstração do uso de fixtures com httpretty.
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