def METHOD_NAME(name):
    resource_type = ResourceType.objects.get_or_create(
        main_type='space', name='space')[0]
    unit = Unit.objects.create(name='unit-{}'.format(name))
    unit.unit_groups.create(name='ug-{}'.format(name))
    resource = Resource.objects.create(
        unit=unit,
        type=resource_type,
        name='res-{}'.format(name),
        authentication='none')
    return resource