Created
February 17, 2022 23:57
-
-
Save henriquebastos/0f68b486bb162dea09990cf154b544ce to your computer and use it in GitHub Desktop.
Uso do fixture do 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
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