Skip to content
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

Merged
merged 26 commits into from Jan 25, 2019

Conversation

yashrsharma44
Copy link
Member

@yashrsharma44 yashrsharma44 commented Jan 18, 2019

  1. Note that this is test commit, demonstrating the mocking of Fido.search and Fido.fetch
  2. Further tests using mock would be written after this pattern of mocking is useful

Description

Partial work for #2874

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
@pep8speaks
Copy link

pep8speaks commented Jan 18, 2019

Hello @yashrsharma44! Thanks for updating the PR.

Line 18:1: E303 too many blank lines (3)
Line 25:20: E203 whitespace before ':'
Line 30:18: E231 missing whitespace after ':'
Line 31:19: E231 missing whitespace after ':'

Comment last updated on January 24, 2019 at 20:33 Hours UTC

@yashrsharma44 yashrsharma44 changed the title Added mocking in fido_search for test_noaa [WIP] Added mocking in fido_search for test_noaa Jan 18, 2019
@nabobalis nabobalis added this to the 1.0 milestone Jan 18, 2019
@nabobalis nabobalis added [WIP] Tests Affects tests in some measure net Affects the net submodule labels Jan 18, 2019
@nabobalis nabobalis changed the title [WIP] Added mocking in fido_search for test_noaa Added mocking in fido_search for test_noaa Jan 18, 2019
@ghost
Copy link

ghost commented Jan 18, 2019

Thanks for the pull request @yashrsharma44! Everything looks great!

@sunpy sunpy deleted a comment Jan 18, 2019
sunpy/net/dataretriever/tests/test_noaa.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Outdated Show resolved Hide resolved
@dpshelio dpshelio mentioned this pull request Jan 19, 2019
1. Added a function, test_fetch_working, for checking if the server returns the same file
2. Used mocking to mock the remaining tests
sunpy/net/dataretriever/tests/test_noaa.py Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Outdated Show resolved Hide resolved
sunpy/net/dataretriever/tests/test_noaa.py Outdated Show resolved Hide resolved
1. Exchanged the import statements
2. Added a new line for import statements
1. Also removed the redundant import
@yashrsharma44

This comment has been minimized.

@yashrsharma44

This comment has been minimized.

@nabobalis

This comment has been minimized.

@nabobalis

This comment has been minimized.

@nabobalis

This comment has been minimized.

@nabobalis

This comment has been minimized.

@yashrsharma44

This comment has been minimized.

@yashrsharma44

This comment has been minimized.

@nabobalis

This comment has been minimized.

@yashrsharma44

This comment has been minimized.

@nabobalis

This comment has been minimized.

@yashrsharma44

This comment has been minimized.

@nabobalis

This comment has been minimized.

@nabobalis

This comment has been minimized.

@yashrsharma44

This comment has been minimized.

@nabobalis

This comment has been minimized.

1.  Currently, QueryResponseBlock does not support
    comparison operation, so this is a ad-hoc
    hack for comparing the values
@nabobalis

This comment has been minimized.

@yashrsharma44
Copy link
Member Author

Yup, accessing private variables is not a good practice, but unless we add a __eq__ method, I guess it is difficult to access the internal values, as QueryResponse does not provide any public method/attribute to access it.

@nabobalis nabobalis dismissed stale reviews from Cadair and themself January 24, 2019 20:17

old news

@yashrsharma44
Copy link
Member Author

Update : I have used the public attributes of QueryResponseBlock, that should serve our purpose.

@nabobalis nabobalis merged commit b26f68e into sunpy:master Jan 25, 2019
@nabobalis
Copy link
Contributor

Thanks @yashrsharma44

@yashrsharma44
Copy link
Member Author

Thank you guys for my first PR for Sunpy !!

ishanisri pushed a commit to ishanisri/sunpy that referenced this pull request Jan 28, 2019
yashrsharma44 added a commit to yashrsharma44/sunpy that referenced this pull request Feb 3, 2019
@dstansby dstansby removed the Needs Review Needs reviews before merge label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
net Affects the net submodule Tests Affects tests in some measure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants