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

merge setup test cassettes #982

Merged
merged 2 commits into from
Jan 17, 2022
Merged

Conversation

lavigne958
Copy link
Collaborator

Simplify cassette recording for test setup

  • 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 every time 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

- 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
@lavigne958 lavigne958 requested a review from burnash January 16, 2022 13:55
@lavigne958 lavigne958 self-assigned this Jan 16, 2022
@lavigne958 lavigne958 merged commit 4971e04 into master Jan 17, 2022
@lavigne958 lavigne958 deleted the feature/merge_setup_test_cassettes branch January 20, 2022 19:30
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.

Simplify test cassettes
2 participants