-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add infrastructure for test-helper methods #773
Conversation
re-r? @richardm-stripe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good - let's wait to merge until the first test_helper
method is released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Pavel! Mainly all minor comments about adding documentation, otherwise this LGTM!
PTAL @pakrym-stripe
PTAL @dcr-stripe ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this looks great! Thanks Pavel!
When generating test_helper methods on a resource we group them into a TestHelpers nested class:
We need a few changes to infrastructure to get this working:
APIResourceTestHelpers
that containsclass_url
andinstance_url
generation logic (sotest_helpers
is included in URLs).test_helpers
decorator to add test_helpers property to the resource class.custom_method
logic adjusted to support having static method on a nested class.