Repository navigation
test(ticketing): build coupon, ticket and report fixtures with factories - #542
Merged
harshtandiya merged 8 commits intoOct 6, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWM6kF7ncqfQx9eYpBKcbm
Split into discount, free-ticket, scope and validity modules that share CouponTestCase. Drop buzz_coupon_code_auto_generated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWM6kF7ncqfQx9eYpBKcbm
Zoom sessions come from the event's own create_*_on_zoom methods. Drop make_qr_image_returns_png_bytes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWM6kF7ncqfQx9eYpBKcbm
Drop the private-helper and empty-list tests; the column tests now cover disabled custom fields, disabled add-ons and distinct UTM names. Merge the two execute_returns_empty tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWM6kF7ncqfQx9eYpBKcbm
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
…to refactor/test-to-factories-3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWM6kF7ncqfQx9eYpBKcbm
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
…to refactor/test-to-factories-3
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SWM6kF7ncqfQx9eYpBKcbm
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
This is lane 2 of the test refactor. It is stacked on #540.
Coupons
test_coupon_discountstest_coupon_free_ticketstest_coupon_scopetest_buzz_coupon_code, which keeps the validity testsbuzz_coupon_code/coupon_test_case.py.BuzzCouponCodeFactorygets the traitspercentage,flatandfree_tickets. Only this lane uses those traits.Tickets
test_event_ticketandtest_event_ticket_typenow use factories,EmailTemplateFactoryandself.set_user.Report
test_detailed_event_registrationsnow uses factories.Tests: 89 → 72. These tests were deleted, as the plan lists:
buzz_coupon_code_auto_generatedmake_qr_image_returns_png_bytes*_empty_listtestsTheir behaviour is now asserted through the column tests. The 2
execute_returns_empty_*tests are merged into 1.Candidates for the cleanup PR:
CouponTestCaseintobuzz/tests/base_test_cases.py.AttendeeTicketAddOnFactory. For now, this lane usescreate_add_on_doc.TicketAddOnFactory(user_selects_option=1, options=...)EventTicketTypeFactory(prices=[...])with a custom priceDemo
Not applicable. This PR changes only tests (
skip-demo).Testing
ruff0.8.1 format and check pass.get_doc({,new_doc(, date literals,test-routeor imports from other test modules remain.🤖 Generated with Claude Code
https://claude.ai/code/session_01SWM6kF7ncqfQx9eYpBKcbm
Generated by Claude Code