def test_repeated_capabilities_invalid_resource_names(): test_result_list = _converters.convert_repeated_capabilities_without_prefix('/') assert test_result_list == '/' test_result_list = _converters.convert_repeated_capabilities_without_prefix('Dev/') assert test_result_list == 'Dev/' test_result_list = _converters.convert_repeated_capabilities_without_prefix('Dev,') assert test_result_list == 'Dev,' test_result_list = _converters.convert_repeated_capabilities_without_prefix('Dev/1/1,') assert test_result_list == 'Dev/1/1,' test_result_list = _converters.convert_repeated_capabilities_without_prefix('0/1:2,') assert test_result_list == '0/1:2,'
def test_repeated_capabilities_tuple_resource_name(): test_result_list = _converters.convert_repeated_capabilities_without_prefix(('Dev1')) assert test_result_list == 'Dev1' test_result_list = _converters.convert_repeated_capabilities_without_prefix(('Dev1', 'Dev2')) assert test_result_list == 'Dev1,Dev2' test_result_list = _converters.convert_repeated_capabilities_without_prefix(('Dev1/0')) assert test_result_list == 'Dev1/0' test_result_list = _converters.convert_repeated_capabilities_without_prefix(('Dev1/0:1', 'Dev2/0-1')) assert test_result_list == 'Dev1/0:1,Dev2/0-1' test_result_list = _converters.convert_repeated_capabilities_without_prefix(('Dev1', 'Dev2/0-2')) assert test_result_list == 'Dev1,Dev2/0-2'
def __set__(self, session, value): session._set_attribute_vi_string( self._attribute_id, _converters.convert_repeated_capabilities_without_prefix(value))
def test_repeated_capabilities_mixed_resource_name(): test_result_list = _converters.convert_repeated_capabilities_without_prefix( ['Dev1', ('Dev2/0', 'Dev2/1'), ['Dev3/0:1', 'Dev4/1:2'], 'Dev5/1']) assert test_result_list == 'Dev1,Dev2/0,Dev2/1,Dev3/0:1,Dev4/1:2,Dev5/1'
def test_repeated_capabilities_without_prefix(): test_result = _converters.convert_repeated_capabilities_without_prefix( (slice(0, 1), '2', [4, '5-6'], '7-9', '11:14', '16, 17')) assert test_result == '0,2,4,5,6,7,8,9,11,12,13,14,16,17'