def test_type_required_validation_infra():
    """Test to validate type while adding a provider"""
    prov = InfraProvider()
    with pytest.raises(AssertionError):
        prov.create()

    view = prov.create_view(InfraProviderAddView)
    assert not view.add.active
Пример #2
0
def test_type_required_validation_infra():
    """Test to validate type while adding a provider"""
    prov = InfraProvider()
    with pytest.raises(AssertionError):
        prov.create()

    view = prov.create_view(InfraProviderAddView)
    assert not view.add.active
Пример #3
0
def test_type_required_validation():
    """Test to validate type while adding a provider"""
    prov = InfraProvider()
    with error.expected(FlashMessageException):
        prov.create()

    view = prov.create_view(ProviderAddView)
    assert not view.add.active
Пример #4
0
def test_type_required_validation():
    """Test to validate type while adding a provider"""
    prov = InfraProvider()
    err = version.pick(
        {version.LOWEST: 'Type is required',
         '5.6': FlashMessageException})

    with error.expected(err):
        prov.create()

    if version.current_version() >= 5.6:
        assert prov.add_provider_button.is_dimmed
Пример #5
0
def test_type_required_validation():
    """Test to validate type while adding a provider"""
    prov = InfraProvider()
    err = version.pick({
        version.LOWEST: 'Type is required',
        '5.6': FlashMessageException
    })

    with error.expected(err):
        prov.create()

    if version.current_version() >= 5.6:
        assert prov.add_provider_button.is_dimmed