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 authored and cdce8p committed 2018-02-27 01:09:49 +01:00
1 parent 446390a8d1
commit 4821858afb
2 files changed
+5 -5

No files matched your search

+1 -1
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)