truthy: Validate options passed to 'allowed-values'
Make sure values passed in allowed values are correct ones. This is possible thanks to previous commit, and should prevent users from writing incorrect configurations.
This commit is contained in:
@@ -97,20 +97,6 @@ class TruthyTestCase(RuleTestCase):
|
||||
problem1=(2, 7), problem2=(3, 7),
|
||||
problem3=(4, 7), problem4=(5, 7))
|
||||
|
||||
def test_empty_string_allowed_values(self):
|
||||
conf = ('truthy:\n'
|
||||
' allowed-values: ["", ""]\n')
|
||||
self.check('---\n'
|
||||
'key1: foo\n'
|
||||
'key2: bar\n', conf)
|
||||
self.check('---\n'
|
||||
'key1: true\n'
|
||||
'key2: yes\n'
|
||||
'key3: false\n'
|
||||
'key4: no\n', conf,
|
||||
problem1=(2, 7), problem2=(3, 7),
|
||||
problem3=(4, 7), problem4=(5, 7))
|
||||
|
||||
def test_explicit_types(self):
|
||||
conf = 'truthy: enable\n'
|
||||
self.check('---\n'
|
||||
|
||||
Reference in New Issue
Block a user