You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When mocking functions in unit tests, it would be good to check that they have been actually called. For instance, the following example could be asserted if it was called:
This way we would avoid situation where some code change leads the mock to fail and we end up running the real code (e.g., executing real HTTP requests during unit testing).
The text was updated successfully, but these errors were encountered:
@marblestation I've hacked a fix to this in the meantime by editing the URLs in the tests to not be real URLs (I've mostly appended _test to the given URLs). I agree that a more robust solution would be good too, but right now we're not in danger of executing real requests.
When mocking functions in unit tests, it would be good to check that they have been actually called. For instance, the following example could be asserted if it was called:
adsabs-pyingest/pyingest/tests/test_parsers.py
Line 395 in 15ae056
This way we would avoid situation where some code change leads the mock to fail and we end up running the real code (e.g., executing real HTTP requests during unit testing).
The text was updated successfully, but these errors were encountered: