summaryrefslogtreecommitdiff
path: root/tests/validators
diff options
context:
space:
mode:
authorJason Myers <jason@jasonamyers.com>2013-11-02 16:34:05 -0500
committerJason Myers <jason@jasonamyers.com>2013-11-02 23:48:47 -0500
commitc3791463a5a9674f8e0148fbab57eae23c138896 (patch)
tree6606acdb74132a344a49e910dec5d0356389a569 /tests/validators
parent2a03a9a9a1c4517be75e72899e545b0bc9dd0688 (diff)
Fixing E302 Errors
Signed-off-by: Jason Myers <jason@jasonamyers.com>
Diffstat (limited to 'tests/validators')
-rw-r--r--tests/validators/tests.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/validators/tests.py b/tests/validators/tests.py
index e3f418ee73..b0d1376aee 100644
--- a/tests/validators/tests.py
+++ b/tests/validators/tests.py
@@ -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')