Skip to content

[test]: Lithostratigraphy tests - #8758

Open
rijulpoudel wants to merge 6 commits into
mainfrom
issue-8756
Open

rijulpoudel wants to merge 6 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.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

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: 72d7eeb5-2834-462c-a425-30ad56a71af0
Commits

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

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.

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 creation, tree references, rank, and optional-field persistence.
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 API test coverage for Chronostratigraphy, including cloning, optional fields, deletion, and version updates.

Suggested reviewers: carolinedenis, melton-jason, grantfitzsimmons

Change: Other

Merge Risk: Minimal · up to c9d16

The change adds lithostratigraphy API lifecycle tests. No actionable merge-blocking risk remains; 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 provides no testing instructions. The changed component is specifyweb/backend/businessrules/tests/test_lithostrat.py, which adds API CRUD, optional… Add a Testing instructions section to the PR description. Include the targeted command ./ve/bin/python manage.py test specifyweb.backend.businessrules.tests.test_lithostrat --verbosity=3 and state that the tests cover Lithostrat API creat…
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 "[test]: Lithostratigraphy tests" matches the main change. The PR adds API-level CRUD tests for lithostratigraphy records in test_lithostrat.py, covering creation with tree relationships, op…
Linked Issues check Passed Issue #8756 requests tests for Lithostratigraphy. The PR adds tests for API creation, optional-field persistence, cloning, deletion of new records, and editing and deleting records created in a previo…
Out of Scope Changes check Passed The whole-PR diff changes only specifyweb/backend/businessrules/tests/test_lithostrat.py. The added helpers and test setup support the Lithostratigraphy test objectives in #8756. No unrelated produc…
Automatic Tests Passed The PR adds automatic tests in specifyweb/backend/businessrules/tests/test_lithostrat.py. The diff increases the test count from 3 to 9 and covers creation, optional fields, cloning, deletion, and e…
Full details: Title check

Explanation

The title "[test]: Lithostratigraphy tests" matches the main change. The PR adds API-level CRUD tests for lithostratigraphy records in test_lithostrat.py, covering creation with tree relationships, optional fields, cloning, deletion, and version 2 to 3 updates. The title is short, specific, and states the primary change. The bracketed "[test]" prefix is a minor style point and does not affect the assessment.

Full details: Linked Issues check

Explanation

Issue #8756 requests tests for Lithostratigraphy. The PR adds tests for API creation, optional-field persistence, cloning, deletion of new records, and editing and deleting records created in a previous version. The tests use concrete assertions for saved values, relationships, deletion, and version changes.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff changes only specifyweb/backend/businessrules/tests/test_lithostrat.py. The added helpers and test setup support the Lithostratigraphy test objectives in #8756. No unrelated production code or unrelated feature changes are present.

Full details: Automatic Tests

Explanation

The PR adds automatic tests in specifyweb/backend/businessrules/tests/test_lithostrat.py. The diff increases the test count from 3 to 9 and covers creation, optional fields, cloning, deletion, and editing of lithostratigraphy records through ApiTests helpers.

Full details: Testing Instructions

Explanation

The PR description contains only “Fixes #8756” and provides no testing instructions. The changed component is specifyweb/backend/businessrules/tests/test_lithostrat.py, which adds API CRUD, optional-field, clone, and versioned-record tests. The repository template includes a Testing instructions section, but the PR does not populate it.

Resolution

Add a Testing instructions section to the PR description. Include the targeted command ./ve/bin/python manage.py test specifyweb.backend.businessrules.tests.test_lithostrat --verbosity=3 and state that the tests cover Lithostrat API creation, optional-field persistence, cloning, deletion, and editing or deleting records from a previous version. Also 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

[test]: Add tests for Lithostratigraphy

1 participant