def test_option_type(self): bad_names = [f"na{char}me" for char in ".: {}#č"] assert_report_item_list_equal( validate.CorosyncOption(option_type="type").validate( {name: "value" for name in bad_names}), [ fixture.error(report_codes.INVALID_USERDEFINED_OPTIONS, option_names=sorted(bad_names), option_type="type", allowed_characters="a-z A-Z 0-9 /_-") ])
def test_valid(self): assert_report_item_list_equal( validate.CorosyncOption().validate({ "name_-/NAME09": "value", }), [])