Пример #1
0
def test_api_port_max_character_validation_infra():
    """Test to validate max character for api port field"""
    endpoint = RHEVMEndpoint(hostname=fauxfactory.gen_alphanumeric(5),
                             api_port=fauxfactory.gen_alphanumeric(16),
                             verify_tls=None,
                             ca_certs=None)
    prov = RHEVMProvider(name=fauxfactory.gen_alphanumeric(5), endpoints=endpoint)
    try:
        prov.create()
    except AssertionError:
        view = prov.create_view(prov.endpoints_form)
        text = view.default.api_port.value
        assert text == prov.default_endpoint.api_port[0:15]
Пример #2
0
def test_api_port_max_character_validation_infra(appliance):
    """Test to validate max character for api port field"""
    collections = appliance.collections.infra_providers
    endpoint = RHEVMEndpoint(hostname=fauxfactory.gen_alphanumeric(5),
                             api_port=fauxfactory.gen_alphanumeric(16),
                             verify_tls=None,
                             ca_certs=None)
    prov = collections.instantiate(prov_class=RHEVMProvider,
                                   name=fauxfactory.gen_alphanumeric(5),
                                   endpoints=endpoint)
    try:
        prov.create()
    except AssertionError:
        view = appliance.browser.create_view(prov.endpoints_form)
        text = view.default.api_port.value
        assert text == prov.default_endpoint.api_port[0:15]