Add permissions foundation (#16890)

* Add permission foundation

* Address comments

* typing

* False > True

* Convert more lambdas

* Use constants

* Remove support for False

* Fix only allow True
This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2018-10-11 19:24:25 +02:00
1 parent 5961f2f577
commit 61f7a39748
7 files changed
+532 -9

No files matched your search

+4 -2
View File
@@ -348,10 +348,12 @@ def mock_device_registry(hass, mock_entries=None):
class MockGroup(auth_models.Group):
"""Mock a group in Home Assistant."""
def __init__(self, id=None, name='Mock Group'):
def __init__(self, id=None, name='Mock Group',
policy=auth_store.DEFAULT_POLICY):
"""Mock a group."""
kwargs = {
'name': name
'name': name,
'policy': policy,
}
if id is not None:
kwargs['id'] = id