def test_validate_selector(): """Test return is the same as input.""" schema = {"device": {"manufacturer": "mock-manuf", "model": "mock-model"}} assert schema == selector.validate_selector(schema)
def test_device_selector_schema(schema): """Test device selector.""" selector.validate_selector({"device": schema})
def test_select_selector_schema_error(schema): """Test select selector.""" with pytest.raises(vol.Invalid): selector.validate_selector({"select": schema})
def test_invalid_base_schema(schema): """Test base schema validation.""" with pytest.raises(vol.Invalid): selector.validate_selector(schema)
def test_text_selector_schema(schema): """Test text selector.""" selector.validate_selector({"text": schema})
def test_select_selector_schema(schema): """Test select selector.""" selector.validate_selector({"select": schema})
def test_target_selector_schema(schema): """Test target selector.""" selector.validate_selector({"target": schema})
def test_action_selector_schema(schema): """Test action sequence selector.""" selector.validate_selector({"action": schema})
def test_boolean_selector_schema(schema): """Test boolean selector.""" selector.validate_selector({"boolean": schema})
def test_time_selector_schema(schema): """Test time selector.""" selector.validate_selector({"time": schema})
def test_addon_selector_schema(schema): """Test add-on selector.""" selector.validate_selector({"addon": schema})
def test_number_selector_schema(schema): """Test number selector.""" selector.validate_selector({"number": schema})
def test_valid_base_schema(schema): """Test base schema validation.""" selector.validate_selector(schema)
def test_area_selector_schema(schema): """Test area selector.""" selector.validate_selector({"area": schema})
def test_entity_selector_schema(schema): """Test entity selector.""" selector.validate_selector({"entity": schema})