Pull out redis validation into validator class
This commit is contained in:
parent
f933b3e295
commit
b2afe68632
6 changed files with 45 additions and 22 deletions
|
@ -31,17 +31,6 @@ class TestValidateConfig(unittest.TestCase):
|
|||
config['TESTING'] = True
|
||||
VALIDATORS[service](config, user, password)
|
||||
|
||||
def test_validate_redis(self):
|
||||
with self.assertRaisesRegexp(ConfigValidationException, 'Missing redis hostname'):
|
||||
self.validate('redis', {})
|
||||
|
||||
with self.assertRaises(redis.ConnectionError):
|
||||
self.validate('redis', {
|
||||
'BUILDLOGS_REDIS': {
|
||||
'host': 'somehost',
|
||||
},
|
||||
})
|
||||
|
||||
def test_validate_mail(self):
|
||||
# Skip mail.
|
||||
self.validated.add('mail')
|
||||
|
|
Reference in a new issue