예제 #1
0
 def _create_random_ca(cls):
     """Create CustomAttribute entity with randomly filled fields."""
     random_ca = entity.CustomAttribute()
     random_ca.ca_type = random.choice(AttributesTypes.ALL_TYPES)
     random_ca.title = cls._generate_title(random_ca.ca_type)
     random_ca.definition_type = random.choice(objects.all_objects)
     return random_ca
예제 #2
0
 def _create_random_ca():
     """Create random CustomAttribute entity."""
     random_ca = entity.CustomAttribute()
     random_ca.ca_type = random.choice(AttributesTypes.ALL_TYPES)
     random_ca.title = CAFactory._generate_title(random_ca.ca_type)
     random_ca.definition_type = random.choice(objects.all_objects)
     return random_ca
예제 #3
0
 def _create_random_ca(cls):
     """Create CustomAttribute entity with randomly filled fields."""
     random_ca = entity.CustomAttribute()
     random_ca.ca_type = random.choice(
         AdminWidgetCustomAttrs.ALL_ATTRS_TYPES)
     random_ca.title = cls._generate_title(random_ca.ca_type)
     random_ca.definition_type = random.choice(objects.ALL_CA_OBJECTS)
     return random_ca