mirror of
https://github.com/django/django.git
synced 2025-08-31 15:57:45 +00:00
Fixing E302 Errors
Signed-off-by: Jason Myers <jason@jasonamyers.com>
This commit is contained in:
parent
2a03a9a9a1
commit
c3791463a5
98 changed files with 748 additions and 96 deletions
|
@ -131,12 +131,12 @@ TEST_DATA = (
|
|||
(MinValueValidator(NOW), NOW - timedelta(days=1), ValidationError),
|
||||
|
||||
(MaxLengthValidator(10), '', None),
|
||||
(MaxLengthValidator(10), 10*'x', None),
|
||||
(MaxLengthValidator(10), 10 * 'x', None),
|
||||
|
||||
(MaxLengthValidator(10), 15*'x', ValidationError),
|
||||
(MaxLengthValidator(10), 15 * 'x', ValidationError),
|
||||
|
||||
(MinLengthValidator(10), 15*'x', None),
|
||||
(MinLengthValidator(10), 10*'x', None),
|
||||
(MinLengthValidator(10), 15 * 'x', None),
|
||||
(MinLengthValidator(10), 10 * 'x', None),
|
||||
|
||||
(MinLengthValidator(10), '', ValidationError),
|
||||
|
||||
|
@ -182,6 +182,7 @@ TEST_DATA = (
|
|||
(RegexValidator(re.compile('x')), 'y', ValidationError),
|
||||
)
|
||||
|
||||
|
||||
def create_simple_test_method(validator, expected, value, num):
|
||||
if expected is not None and issubclass(expected, Exception):
|
||||
test_mask = 'test_%s_raises_error_%d'
|
||||
|
@ -214,6 +215,7 @@ def create_simple_test_method(validator, expected, value, num):
|
|||
|
||||
# Dynamically assemble a test class with the contents of TEST_DATA
|
||||
|
||||
|
||||
class TestSimpleValidators(TestCase):
|
||||
def test_single_message(self):
|
||||
v = ValidationError('Not Valid')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue