def test_host_name_max_character_validation(): """Test to validate max character for host name field""" prov = VMwareProvider(name=fauxfactory.gen_alphanumeric(5), hostname=fauxfactory.gen_alphanumeric(256), ip_address='10.10.10.13') prov.create() prov.delete(cancel=False)
def test_host_name_max_character_validation(): """Test to validate max character for host name field""" prov = VMwareProvider( name=fauxfactory.gen_alphanumeric(5), hostname=fauxfactory.gen_alphanumeric(256), ip_address='10.10.10.13') prov.create() prov.delete(cancel=False)
def test_ip_required_validation(): """Test to validate the ip address while adding a provider""" prov = VMwareProvider(name=fauxfactory.gen_alphanumeric(5), hostname=fauxfactory.gen_alphanumeric(5), ip_address=None) with error.expected("IP Address can't be blank"): prov.create()
def test_host_name_required_validation(): """Test to validate the hostname while adding a provider""" prov = VMwareProvider(name=fauxfactory.gen_alphanumeric(5), hostname=None, ip_address='10.10.10.11') with error.expected("Host Name can't be blank"): prov.create()
def test_ip_required_validation(): """Test to validate the ip address while adding a provider""" prov = VMwareProvider( name=fauxfactory.gen_alphanumeric(5), hostname=fauxfactory.gen_alphanumeric(5), ip_address=None) with error.expected("IP Address can't be blank"): prov.create()
def test_host_name_required_validation(): """Test to validate the hostname while adding a provider""" prov = VMwareProvider( name=fauxfactory.gen_alphanumeric(5), hostname=None, ip_address='10.10.10.11') with error.expected("Host Name can't be blank"): prov.create()
def test_add_cancelled_validation(): """Tests that the flash message is correct when add is cancelled.""" prov = VMwareProvider() prov.create(cancel=True) if version.current_version() >= 5.6: msg = 'Add of Infrastructure Provider was cancelled by the user' else: msg = 'Add of new Infrastructure Provider was cancelled by the user' flash.assert_message_match(msg)
def test_host_name_required_validation(): """Test to validate the hostname while adding a provider""" prov = VMwareProvider( name=fauxfactory.gen_alphanumeric(5), hostname=None, ip_address='10.10.10.11') err = version.pick( {version.LOWEST: "Host Name can't be blank", '5.6': FlashMessageException}) with error.expected(err): prov.create() if version.current_version() >= 5.6: assert prov.properties_form.hostname_text.angular_help_block == "Required" assert prov.add_provider_button.is_dimmed
def test_add_cancelled_validation(): """Tests that the flash message is correct when add is cancelled.""" prov = VMwareProvider() prov.create(cancel=True) flash.assert_message_match('Add of new Infrastructure Provider was cancelled by the user')
def test_add_cancelled_validation(): """Tests that the flash message is correct when add is cancelled.""" prov = VMwareProvider() prov.create(cancel=True) flash.assert_message_match( 'Add of new Infrastructure Provider was cancelled by the user')