Esempio n. 1
0
def F5SysiAppService():
    '''Instantiate the F5SysiAppService resource.'''
    template_dict = mock_template()
    rsrc_def = create_resource_definition(template_dict)
    mock_stack = mock.MagicMock()
    mock_stack.resource_by_refid().get_partition_name.return_value = 'Common'
    return f5_sys_iappservice.F5SysiAppService("testing_service", rsrc_def,
                                               mock_stack)
Esempio n. 2
0
def test_empty_json_property():
    template_dict, rsrc_def = controlled_init(empty_json_defn)
    with pytest.raises(ValueError):
        f5_sys_iappservice.F5SysiAppService('test', rsrc_def, mock.MagicMock())
Esempio n. 3
0
def test_bad_property():
    template_dict, rsrc_def = controlled_init(bad_iapp_service_defn)
    f5_sys_iappservice_obj = f5_sys_iappservice.F5SysiAppService(
        'test', rsrc_def, mock.MagicMock())
    with pytest.raises(exception.StackValidationFailed):
        f5_sys_iappservice_obj.validate()
def F5SysiAppService():
    '''Instantiate the F5SysiAppService resource.'''
    template_dict = mock_template()
    rsrc_def = create_resource_definition(template_dict)
    return f5_sys_iappservice.F5SysiAppService("testing_service", rsrc_def,
                                               mock.MagicMock())