testing help #916
michelkluger
started this conversation in
General
Replies: 1 comment 2 replies
-
|
Are you mocking
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using a CachedSession and its method get, for an external endpoint,
in my test this endpoint is not reached, so I want to mock the response.
which I am trying to do with,
mock_cached_session.get.return_value.status_code = 200mock_cached_session.get.return_value.json.return_value = [dict(mock_response)]but after mocking, I am trying to test that caching time is respected, which it is when I manually test it, but not when testing.
I the mock negatively impacting the caching? how can I write such test?
Beta Was this translation helpful? Give feedback.
All reactions