Skip to content

Test deep nesting through a Family edge - #1250

Closed
toruiwasa wants to merge 3 commits into
opensanctions:mainfrom
toruiwasa:test-family-nesting
Closed

toruiwasa wants to merge 3 commits into
opensanctions:mainfrom
toruiwasa:test-family-nesting

Conversation

@toruiwasa

Copy link
Copy Markdown
Contributor

Closes #80.

Adds a test that walks the nested response across a Family edge: the root person, the four Family entities naming them as a relative, and the person on the other side of each. The zala fixture already has these ties, so no fixture changes.

The general case has been covered since #686. test_entity_nested now walks Person → Payment → Organization on parteispenden. What was missing is the Family case this issue names, and zala is the only fixture with it.

The , res.text on the status assertion is a separate commit. Most assertions under tests/ attach a message but this file mostly doesn't, so drop it if you'd rather keep the file consistent.

Most status assertions under tests/ carry the response body or the
response; test_entity.py mostly doesn't. Following the wider convention
here so a CI failure shows why the request failed, and leaving the rest
of the file alone.
by_id already fails on a bare ID, but with a TypeError rather than a
readable assertion. This states what the test is for.
@leonhandreke

Copy link
Copy Markdown
Contributor

As you wrote in the PR description, test_entity_nested already covers this case, so I don't think we need an additional one. We try to keep the test suite comprehensive but lean.

I don't quite know how you ended up wanting to tackle this issue, but if it's just an LLM looking for low-hanging fruit: We generally discourage low-effort contributions that are LLM-driven and contain very little to no human effort. If you're a human eager to join the community and contribute, that's something we absolutely welcome and I'm sure we can find some issues that would be fun and rewarding to work on!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-instate deep nesting tests

2 participants