Skip to content

[test]: Lithostratigraphy tests - #8758

Merged
CarolineDenis merged 7 commits into
mainfrom
issue-8756
Nov 4, 2026
Merged

CarolineDenis merged 7 commits into
mainfrom
issue-8756

Conversation

@rijulpoudel

@rijulpoudel rijulpoudel commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Fixes #8756

Summary by CodeRabbit

  • Tests
    • 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.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

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: Passed 5 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Testing Instructions Warning 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 Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: adding Lithostratigraphy tests.
Linked Issues check Passed 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 Passed 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 Passed 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.

Share
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b1222947-6c1a-47cc-88d0-af8c313af193
Commits

Reviewing files that changed from the base of the PR and between c9d162a and daae7aa.

Files selected for processing: 1
  • specifyweb/backend/businessrules/tests/test_lithostrat.py

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@CarolineDenis
CarolineDenis merged commit 3026a98 into main Nov 4, 2026
20 checks passed
@CarolineDenis
CarolineDenis deleted the issue-8756 branch November 4, 2026 12:38
@github-project-automation github-project-automation Bot moved this from 📋Back Log to ✅Done in General Tester Board Nov 4, 2026
@CarolineDenis CarolineDenis added this to the 7.12.3 milestone Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅Done

Development

Successfully merging this pull request may close these issues.

[test]: Add tests for Lithostratigraphy

2 participants