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 support for django.contrib.auth.forms.UsernameField #3419
Add support for django.contrib.auth.forms.UsernameField #3419
Conversation
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.
Looks like a great start - thanks so much for contributing!
Remaining things: add yourself to the list in AUTHORS.rst
, ReadOnlyPasswordHashField
support, and adding a hypothesis-python/RELEASE.rst
:
RELEASE_TYPE: minor
:func:`~hypothesis.extra.django.from_field` now supports
:class:`~django.contrib.auth.forms.UsernameField` and
:class:`~django.contrib.auth.forms.ReadOnlyPasswordHashField`
from ``django.contrib.auth.forms``.
Thanks to Afonso Silva for reporting and fixing :issue:`3417`.
Thanks @Zac-HD, I've added myself to the authors list and added a release file. |
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.
Looks good to me! Once we work out why this broke the docs build (and unbreak it), I'll merge 🎉
And then we can take a look at the other points in #3417 😁
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
There is a small typo in hypothesis-python/src/hypothesis/internal/conjecture/dfa/lstar.py. Should read `organising` rather than `organisating`. Signed-off-by: Tim Gates <tim.gates@iress.com>
Turns out that Django doesn't have reference docs for UsernameField.
Thanks again @ajcerejeira! |
django.contrib.auth.forms
defines two form fields, UsernameField and ReadOnlyPasswordHashField that are used by django admin website.At the moment
hypothesis
does not define a default strategy forUsernameField
so this MR adds that support by reusing the same strategy forCharField
.Partial fix for #3417. Incorporates and closes #3420, incorporates and closes #3421 - neither really need a separate release.