1
mirror of https://github.com/home-assistant/core synced 2024-09-09 12:51:22 +02:00
ha-core/tests/auth/permissions/test_util.py
Paulus Schoutsen 4de97abc3a Black
2019-07-31 12:25:30 -07:00

13 lines
370 B
Python

"""Test the permission utils."""
from homeassistant.auth.permissions import util
def test_test_all():
"""Test if we can test the all group."""
for val in (None, {}, {"all": None}, {"all": {}}):
assert util.test_all(val, "read") is False
for val in (True, {"all": True}, {"all": {"read": True}}):
assert util.test_all(val, "read") is True