test: add Mezzanine golden fixture#17
Conversation
Vendored from stephenmcd/mezzanine@master mezzanine/blog/models.py. Adds BSD-2 attribution and extends the golden fixture fetch script. Co-Authored-By: Kimi K2.7 Code <noreply@kimi.com>
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
One thing worth flagging that this fixture surfaced, since it's baked into the golden output rather than being a bug in this PR.
That pattern — concrete models inheriting from an abstract base in a different app/module — is extremely common in real Django projects, so the gap probably costs real coverage beyond this fixture. I've deliberately left the parser alone and recorded the golden output as-is, per the "fixture only, no parser changes" scope: the committed golden file documents current behaviour, and the test asserts ≥1 model, which passes. Happy to open a separate issue for the cross-module base resolution if that's useful — or if you'd rather the fixture wait until that's fixed, say the word and I'll hold it. |
Adds a Mezzanine golden fixture under
cli/tests/fixtures/golden/mezzanine/.Vendored upstream file
mezzanine/blog/models.pystephenmcd/mezzanine@masterThe file is preserved verbatim (mirrors the upstream path) and is attributed in
cli/tests/fixtures/golden/mezzanine/README.mdunder the BSD-2-Clause licence.What this coverage exercises
BlogPostinherits fromDisplayable,Ownable,RichText, andAdminThumbMixin.FileField,CommentsField,RatingField,mezzanine.conf.settings).Golden output generation
The existing
cli/tests/test_golden_fixtures.pyparametrizes over fixture directories and runsscan_workspace; the new fixture is picked up automatically by directory discovery.pytestwas run fromcli/.Gates
pytest -q(fromcli/): 45 passed.ruff check ../scripts/fetch_golden_fixtures.py tests/test_golden_fixtures.py: clean.rufflints in parser/CLI source were left untouched (out of scope).Closes #13
Prepared with AI assistance (Kimi K2.7 Code), human-reviewed before submission.