You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expanded API test coverage for lithostratigraphy record creation, updates, cloning, deletion, optional fields, and version changes. Added checks for records created before the current version, including updates that advance the record version.
No actionable comments were generated in the recent review.
Walkthrough
The PR adds API-level tests for lithostratigraphy creation, optional-field persistence, cloning, updating a pre-existing record, and deletion.
Changes: Lithostratigraphy API test coverage
Layer / File(s)
Summary
Payload helpers and record creation specifyweb/backend/businessrules/tests/test_lithostrat.py
Adds payload and pre-existing-record helpers. Tests API creation and persistence of optional fields.
Clone, update, and delete specifyweb/backend/businessrules/tests/test_lithostrat.py
Tests cloning, deletion of new and pre-existing records, and updating a version-2 record to version 3.
Possibly related PRs
specify/specify7#8736: Adds similar CRUD tests for Chronostratigraphy, including optional fields, cloning, deletion, and version updates.
specify/specify7#8763: Adds similar CRUD tests for Tectonic Unit, including configured tree ranks, optional fields, deletion, and updates to pre-existing records.
Suggested reviewers:melton-jason, g1rly-c0d3r
Change: Other
Merge Risk: Minimal · up to daae7
The added tests cover creation, optional fields, cloning, updating, and deletion. No actionable merge-blocking risk is established; merge after normal checks pass.
Pre-merge checks: 5 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Testing Instructions
The PR description contains only “Fixes #8756” and no testing instructions. The PR changes specifyweb/backend/businessrules/tests/test_lithostrat.py with Lithostrat API creation, optional-field pers…
Add a ### Testing instructions section to the PR description. Include ./ve/bin/python manage.py test specifyweb.backend.businessrules.tests.test_lithostrat --verbosity=3. State that the tests cover Lithostrat API creation, optional-fiel…
Passed checks: 5 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly identifies the main change: adding Lithostratigraphy tests.
Linked Issues check
Issue #8756 requests Lithostratigraphy tests. The PR adds tests for API creation, optional-field persistence, cloning, deletion, and editing and deleting records created before the current version. Th…
Out of Scope Changes check
The whole-PR diff changes only specifyweb/backend/businessrules/tests/test_lithostrat.py. The helpers and test cases directly support issue #8756. The diff adds no unrelated production code or unrel…
Automatic Tests
The PR adds automatic tests in specifyweb/backend/businessrules/tests/test_lithostrat.py. The LithostratTests class includes tests for creation, optional-field round trips, cloning, deletion, and …
Full details: Linked Issues check
Explanation
Issue #8756 requests Lithostratigraphy tests. The PR adds tests for API creation, optional-field persistence, cloning, deletion, and editing and deleting records created before the current version. The tests assert saved fields, relationships, IDs, deletion, and version increment behavior.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff changes only specifyweb/backend/businessrules/tests/test_lithostrat.py. The helpers and test cases directly support issue #8756. The diff adds no unrelated production code or unrelated feature changes.
Full details: Automatic Tests
Explanation
The PR adds automatic tests in specifyweb/backend/businessrules/tests/test_lithostrat.py. The LithostratTests class includes tests for creation, optional-field round trips, cloning, deletion, and editing or deleting records created in a previous version. The tests use the existing API and Django test helpers.
Full details: Testing Instructions
Explanation
The PR description contains only “Fixes #8756” and no testing instructions. The PR changes specifyweb/backend/businessrules/tests/test_lithostrat.py with Lithostrat API creation, optional-field persistence, cloning, deletion, and previous-version edit/delete tests. The repository template includes a ### Testing instructions section at .github/pull-request-template.md:19.
Resolution
Add a ### Testing instructions section to the PR description. Include ./ve/bin/python manage.py test specifyweb.backend.businessrules.tests.test_lithostrat --verbosity=3. State that the tests cover Lithostrat API creation, optional-field persistence, cloning, deletion, and editing or deleting records from a previous version. State whether the full test suite was run.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8756
Summary by CodeRabbit