Homekit schema gracefully fail with integer (#12725)

* Homekit schema gracefully fail with integer
* Fix return value
* Added test
* Fix 2
This commit is contained in:
Johann Kellerman 2018-02-27 02:09:49 +02:00 committed by cdce8p
parent 446390a8d1
commit 4821858afb
2 changed files with 5 additions and 5 deletions

View file

@ -73,7 +73,7 @@ class TestHomeKit(unittest.TestCase):
"""Test async_setup with invalid config option."""
schema = vol.Schema(valid_pin)
for value in ('', '123-456-78', 'a23-45-678', '12345678'):
for value in ('', '123-456-78', 'a23-45-678', '12345678', 1234):
with self.assertRaises(vol.MultipleInvalid):
schema(value)