Skip to content

Instantly share code, notes, and snippets.

@henriquebastos
Created February 17, 2022 23:57
Show Gist options
  • Save henriquebastos/0f68b486bb162dea09990cf154b544ce to your computer and use it in GitHub Desktop.
Save henriquebastos/0f68b486bb162dea09990cf154b544ce to your computer and use it in GitHub Desktop.
Uso do fixture do httpretty
def test_session_uses_custom_json_decoder(httpretty):
httpretty.register_uri(
httpretty.GET, URL, serialize({"datetime": datetime(2021, 12, 4)})
)
response = EduzzSession().get("/")
data = response.json()
assert isinstance(data["datetime"], datetime)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment