Skip to content

Fix failing test: sync CollectionObject expected errors in tests_legacy.py#8106

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-failing-tests-main
Open

Fix failing test: sync CollectionObject expected errors in tests_legacy.py#8106
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-failing-tests-main

Conversation

Copy link
Copy Markdown

Copilot AI commented May 21, 2026

Fixes #8105

test_sqlalchemy_model_errors in tests_legacy.py was failing because the projects relationship on CollectionObject — the reverse relation of Project.collectionobjects ManyToManyField — was added to the SQLAlchemy model, but tests_legacy.py's expected_errors still listed it under not_found. tests.py had already been updated; tests_legacy.py had not.

Change

  • tests_legacy.py: Remove "not_found": ["projects"] from the CollectionObject entry in expected_errors, bringing it in sync with tests.py:
# Before
"CollectionObject": {
    "not_found": ["projects"],
    "incorrect_direction": {"cojo": ["onetomany", "onetoone"]},
},

# After
"CollectionObject": {
    "incorrect_direction": {"cojo": ["onetomany", "onetoone"]},
},

…xpected errors

Agent-Logs-Url: https://github.com/specify/specify7/sessions/9b75be0a-76a5-4763-8c52-f32eb2645b7a

Co-authored-by: grantfitzsimmons <37256050+grantfitzsimmons@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing tests in main Fix failing test: sync CollectionObject expected errors in tests_legacy.py May 21, 2026
Copilot AI requested a review from grantfitzsimmons May 21, 2026 15:03
@grantfitzsimmons grantfitzsimmons marked this pull request as ready for review May 22, 2026 03:21
@grantfitzsimmons grantfitzsimmons added this to the 7.12.1 milestone May 22, 2026
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.

Fix failing tests in main

2 participants