Generalize the validator for regex form fields, and add a test for an invalid regex.
Review Request #4616 — Created Sept. 21, 2013 and submitted
Generalize the validator for regex form fields, and add a test for an invalid regex.
This moves DefaultReviewerForm.clean_file_regex out into a reusable validator
that can be added to any field. In addition, I've added a test for attempting
to create a default reviewer with an invalid regular expression.I did this incidentally while banging my head against failures caused by the
changes to PUT in the test client, but it's a good change nonetheless.
Ran unit tests
Description | From | Last Updated |
---|---|---|
Col: 5 E303 too many blank lines (2) |
reviewbot |
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/webapi/tests/test_default_reviewer.py
reviewboard/reviews/forms.py
Ignored Files:
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/webapi/tests/test_default_reviewer.py
reviewboard/reviews/forms.py
Ignored Files: