Skip to content

Convert lab unit test mocks from Python dict to JSON #220

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

tianyizheng02
Copy link
Contributor

Convert the mocks for lab unit tests from Python dicts to JSON files. This makes the mocking of lab unit tests more consistent with how unit tests for most other modules are mocked. This also avoids unnecessarily mocking entire module functions, as only the HTTP requests made by those functions need to be mocked. Since the mocks are only supposed to contain JSON HTTP responses anyway, it makes more sense to keep them as JSON.

I placed the new JSON mocks in the tests/samples/ directory rather than the tests/mocks/ directory where the current mocks are located. I'm doing this as part of a larger effort to migrate all the mocks in tests/mocks/ to tests/samples so that mocks won't be split across two sibling directories.

Convert the mocks for lab unit tests from Python dicts to JSON files.
This makes the mocking of lab unit tests more consistent with how unit
tests for most other modules are mocked. This also avoids unnecessarily
mocking entire module functions, as only the HTTP requests made by those
functions need to be mocked. Since the mocks are only supposed to
contain JSON HTTP responses anyway, it makes more sense to keep them as
JSON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant