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

Shorten esa/jwst and gaia tests #2525

Merged
merged 2 commits into from
Sep 12, 2022
Merged

Conversation

eerovaher
Copy link
Member

Making a couple of small changes in the classes that are used for mocking server responses in esa/jwst and gaia tests made it possible to shorten the tests quite a lot. This makes the current tests simpler to understand and any future tests simpler to write. See the commit messages for details.

`DummyResponse` is used in `esa/jwst` and `gaia` tests for mimicking
server responses. Now the `message` attribute of an instance is
automatically determined by its `status`, whereas previously it had to
be set manually in a separate step. Furthermore, the `status` of a
`DummyResponse` can now be set through `__init__()`.
`DummyResponse` is used in `esa/jwst` and `gaia` tests for mimicking
server responses. Now the response data can be specified by only setting
the parameters that have non-default values.
Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good, thanks for the cleanup!

@bsipocz bsipocz merged commit af8d510 into astropy:main Sep 12, 2022
@eerovaher eerovaher deleted the shorter-tapplus-tests branch September 12, 2022 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants