def step_impl(context: Context, type_label: str, value_type: str): sub_labels = parse_list(context.table) attribute_type = attribute_type_as_value_type(context, type_label, parse_value_type(value_type)) actuals = list( map(lambda tt: tt.get_label(), attribute_type.as_remote(context.tx()).get_subtypes())) print(parse_value_type(value_type)) print(attribute_type) print(actuals) for sub_label in sub_labels: assert_that(sub_label, not_(is_in(actuals)))
def step_impl(context: Context, type_label: str, value_type, regex: str): value_type = parse_value_type(value_type) assert_that(value_type, is_(ValueType.STRING)) attribute_type = attribute_type_as_value_type(context, type_label, value_type) attribute_type.as_remote(context.tx()).set_regex(regex)
def step_impl(context: Context, type_label: str, value_type: str): supertype = context.tx().concepts().get_attribute_type( type_label).as_remote(context.tx()).get_supertype() assert_that(supertype.get_value_type(), is_(parse_value_type(value_type)))
def step_impl(context: Context, type_label: str, value_type: str): assert_that( context.tx().concepts().get_attribute_type( type_label).get_value_type(), is_(parse_value_type(value_type)))
def step_impl(context: Context, type_label: str, value_type: str): context.tx().concepts().put_attribute_type(type_label, parse_value_type(value_type))
def step_impl(context: Context, type_label: str, value_type): value_type = parse_value_type(value_type) assert_that(value_type, is_(AttributeType.ValueType.STRING)) attribute_type = attribute_type_as_value_type(context, type_label, value_type) assert_that(attribute_type.as_remote(context.tx()).get_regex(), is_(None))