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

Embed: refactor tests #7947

Merged
merged 3 commits into from Feb 24, 2021
Merged

Embed: refactor tests #7947

merged 3 commits into from Feb 24, 2021

Conversation

stsewd
Copy link
Member

@stsewd stsewd commented Feb 23, 2021

  • Make them more readable by splitting the html from the json file,
    similarly to what we do with the search tests.
  • Move data dir one level up, we don't need to have it nested.
  • Don't do two calls to storage, just open the file.
  • Remove unused requests adaptor (probably was something used before
    storage)

Didn't bother to split the mkdocs json file,
since that mkdocs doesn't output that kind of format anymore,
we should start reading from the html file itself.

Based on #7943

- Make them more readable by splitting the html from the json file,
  similarly to what we do with the search tests.
- Don't do two calls to storage, just open the file.
- Remove unused requests adaptor (probably was something used before
  storage)

Didn't bother to split the mkdocs json file,
since that mkdocs doesn't output that kind of format anymore,
we should start reading from the html file itself.
readthedocs/embed/views.py Outdated Show resolved Hide resolved
readthedocs/embed/views.py Outdated Show resolved Hide resolved
stsewd and others added 2 commits February 24, 2021 11:08
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
@stsewd stsewd mentioned this pull request Feb 24, 2021
Base automatically changed from embed-app to master February 24, 2021 23:32
@stsewd stsewd merged commit fe8ad25 into master Feb 24, 2021
@stsewd stsewd deleted the refactor-embed-tests branch February 24, 2021 23:35
agjohnson pushed a commit that referenced this pull request Mar 2, 2021
* Embed: refactor tests

- Make them more readable by splitting the html from the json file,
  similarly to what we do with the search tests.
- Don't do two calls to storage, just open the file.
- Remove unused requests adaptor (probably was something used before
  storage)

Didn't bother to split the mkdocs json file,
since that mkdocs doesn't output that kind of format anymore,
we should start reading from the html file itself.

* Apply suggestions from code review

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>

* Remove requests mock

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
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.

None yet

2 participants