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

Simplify test cassettes #981

Closed
lavigne958 opened this issue Jan 15, 2022 · 0 comments · Fixed by #982
Closed

Simplify test cassettes #981

lavigne958 opened this issue Jan 15, 2022 · 0 comments · Fixed by #982
Assignees
Milestone

Comments

@lavigne958
Copy link
Collaborator

Overview

Simplify the test cassettes. Move every setup API call to a single file

Details

Currently we generate the following cassettes for each test class:

  1. create the spreadsheet
  2. clear the sheet
  3. the test itself

We could merge the first 2 cassettes.
This will allow us to clear any API call needed to do the setup in a single file. This is necessary in case the test needs to change the API call to record (Add, remove, update calls).

@lavigne958 lavigne958 added this to the 5.2.0 milestone Jan 15, 2022
@lavigne958 lavigne958 self-assigned this Jan 15, 2022
lavigne958 added a commit that referenced this issue Jan 16, 2022
- Use a single cassette for the whole init/teardown
- Use a cassette file name with no white characters

If test needs to update the API call it makes, it is easier to only have
to re-generate a single file.

The spreadsheet creation is done only once but the single sheet is
cleared everytime before a new test starts. We must record the
spreadsheet creation then close the cassette to allow the fixture
`reset_sheet` to find the cassette. Then open it again to record the
file deletion.

Next time a test needs to be updated and make an extra API call,
simplify delete the cassette and run the test recording new episodes.

Closes #981
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant