'Test arbitrary maximal lengths requirements.'

def test_max_length(self):

    Text(max_length=0).validate('')
    Text(max_length=0).validate(None)
    Text(max_length=1).validate('')
    Text(max_length=1).validate(None)
    Text(max_length=1).validate('b')
    Text(max_length=5).validate('')
    Text(max_length=5).validate(None)
    Text(max_length=5).validate('b')
    Text(max_length=5).validate('blake')
    with self.assertRaises(ValidationError):
        Text(max_length=0).validate('b')
    with self.assertRaises(ValidationError):
        Text(max_length=5).validate('blaketastic')
    with self.assertRaises(ValueError):
        Text(max_length=(-1))
