New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added mocking in fido_search for test_noaa #2900
Conversation
1. Note that this is test commit, demonstrating the mocking of Fido.search 2. Further tests using mock would be written after this pattern of mocking is useful
Hello @yashrsharma44! Thanks for updating the PR.
Comment last updated on January 24, 2019 at 20:33 Hours UTC |
Thanks for the pull request @yashrsharma44! Everything looks great! |
1. Added a function, test_fetch_working, for checking if the server returns the same file 2. Used mocking to mock the remaining tests
1. Exchanged the import statements 2. Added a new line for import statements
1. Also removed the redundant import
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1. Currently, QueryResponseBlock does not support comparison operation, so this is a ad-hoc hack for comparing the values
This comment has been minimized.
This comment has been minimized.
Yup, accessing private variables is not a good practice, but unless we add a |
Update : I have used the public attributes of QueryResponseBlock, that should serve our purpose. |
Thanks @yashrsharma44 |
Thank you guys for my first PR for Sunpy !! |
Added mock tests for test_noaa.py
Added mock tests for test_noaa.py
Fido.search
andFido.fetch
Description
Partial work for #2874