def test_getHardwareProfile(dbm):
    """
    Get hardware profile with default resource adapter configuration
    defined.
    """

    name = 'aws'

    with dbm.session() as session:
        result = HardwareProfileDbApi().getHardwareProfile(session, name)

    assert isinstance(result, HardwareProfile)

    assert result.getName() == name

    assert result.getDefaultResourceAdapterConfig() is None

    assert result.getResourceAdapter()
def test_getHardwareProfile_alt(dbm):
    """
    Get hardware profile with default resource adapter configuration
    defined.
    """

    name = 'aws2'

    with dbm.session() as session:
        result = HardwareProfileDbApi().getHardwareProfile(session, name)

    assert isinstance(result, HardwareProfile)

    assert result.getName() == name

    # 'nondefault' is the known default resource adapter configuration
    # profile for the hardware profile 'aws2'
    assert result.getDefaultResourceAdapterConfig() == 'nondefault'

    assert result.getResourceAdapter()