Clean up input-datetime (#16000)

This commit is contained in:
Paulus Schoutsen 2018-08-16 22:17:14 +02:00 committed by GitHub
parent 2a210607d3
commit 834077190f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 60 additions and 112 deletions

View file

@ -523,21 +523,6 @@ def test_has_at_least_one_key():
schema(value)
def test_has_at_least_one_key_value():
"""Test has_at_least_one_key_value validator."""
schema = vol.Schema(cv.has_at_least_one_key_value(('drink', 'beer'),
('drink', 'soda'),
('food', 'maultaschen')))
for value in (None, [], {}, {'wine': None}, {'drink': 'water'}):
with pytest.raises(vol.MultipleInvalid):
schema(value)
for value in ({'drink': 'beer'}, {'food': 'maultaschen'},
{'drink': 'soda', 'food': 'maultaschen'}):
schema(value)
def test_enum():
"""Test enum validator."""
class TestEnum(enum.Enum):