def test_negative_create(self): """Smart Variable is not created with invalid data. :id: 09a67cb6-5de0-41b3-90f4-593323936c6c :steps: Creates a smart variable with invalid name and valid default value. :expectedresults: 1. Error is displayed for invalid variable name. 2. The smart Variable is not created. :CaseImportance: Critical """ with Session(self) as session: for name in invalid_names_list(): with self.subTest(name): make_smart_variable(session, name=name, puppet_class=self.puppet_class.name, default_value=gen_string('alpha')) self.assertIsNotNone( self.smart_variable.wait_until_element( common_locators['haserror'])) self.assertIsNone(self.smart_variable.search(name))
def test_negative_create_vmware_with_invalid_name(self): """Create a new vmware compute resource with invalid names. :id: 19c206dc-5efc-4a7d-b04d-2aa04a22448c :setup: vmware hostname and credentials. :steps: 1. Create a compute resource of type vmware. 2. Provide valid hostname, username and password. 3. Provide invalid name to vmware compute resource. 4. Test the connection using Load Datacenters and submit. :expectedresults: A vmware compute resource is not created :Caseautomation: Automated :CaseImportance: Critical """ parameter_list = [ ['VCenter/Server', self.vmware_url, 'field'], ['Username', self.vmware_username, 'field'], ['Password', self.vmware_password, 'field'], ['Datacenter', self.vmware_datacenter, 'special select'], ] with Session(self) as session: for name in invalid_names_list(): with self.subTest(name): make_resource(session, name=name, provider_type=FOREMAN_PROVIDERS['vmware'], parameter_list=parameter_list) self.assertIsNotNone( self.compute_resource.wait_until_element( common_locators["name_haserror"]))
def test_negative_create_libvirt_with_invalid_name(self): """@Test: Create a new libvirt Compute Resource with incorrect values only @Feature: Compute Resource - Create @Assert: A libvirt Compute Resource is not created """ include_list = [' '] with Session(self.browser) as session: for name in invalid_names_list() + include_list: with self.subTest(name): make_resource( session, name=name, provider_type=FOREMAN_PROVIDERS['libvirt'], parameter_list=[ ['URL', self.current_libvirt_url, 'field'] ], ) self.assertIsNotNone( self.compute_resource.wait_until_element( common_locators["name_haserror"] ) )
def test_negative_create(self): """Smart Variable is not created with invalid data. :id: 09a67cb6-5de0-41b3-90f4-593323936c6c :steps: Creates a smart variable with invalid name and valid default value. :expectedresults: 1. Error is displayed for invalid variable name. 2. The smart Variable is not created. :CaseImportance: Critical """ with Session(self) as session: for name in invalid_names_list(): with self.subTest(name): make_smart_variable( session, name=name, puppet_class=self.puppet_class.name, default_value=gen_string('alpha') ) self.assertIsNotNone( self.smart_variable.wait_until_element( common_locators['haserror']) ) self.assertIsNone(self.smart_variable.search(name))
def test_negative_create_user_with_invalid_surname(self): """@Test: Create User with invalid Surname @Feature: User - Negative Create @Steps: 1. Create User for all invalid Surname in [2] using valid Username, First Name Email Address, Language, authorized by @Assert: User is not created. Appropriate error shown. """ with Session(self.browser) as session: # invalid_values_list is not used here because sur name is an # optional field for last_name in invalid_names_list(): with self.subTest(last_name): make_user( session, username=gen_string('alpha'), last_name=last_name, ) self.assertIsNotNone( self.user.wait_until_element( common_locators['haserror']) )
def test_negative_create_scap_content_with_invalid_title(self): """Create scap-content with invalid title :id: 90a2590e-a6ff-41f1-9e0a-67d4b16435c0 :setup: 1. Oscap should be enabled. 2. Oscap-cli hammer plugin installed. 3. Scap data stream ".xml" file. :steps: 1. Login to hammer shell. 2. Execute "scap-content" command with "create" as sub-command. 3. Pass valid parameters and invalid title. :expectedresults: The scap-content is not created. :CaseImportance: Critical """ for title in invalid_names_list(): with self.subTest(title): with self.assertRaises(CLIFactoryError): make_scapcontent({ 'title': title, 'scap-file': '/tmp/{0}'.format(self.file_name)})
def test_negative_update_name(self): """Update invalid name in an activation key :id: 6eb0f747-cd4d-421d-b11e-b8917bb0cec6 :expectedresults: Activation key is not updated. Appropriate error shown. :CaseImportance: Critical """ name = gen_string('alpha', 10) with Session(self) as session: make_activationkey( session, org=self.organization.name, name=name, env=ENVIRONMENT, ) self.assertIsNotNone(self.activationkey.search(name)) for new_name in invalid_names_list(): with self.subTest(new_name): self.activationkey.update(name, new_name) self.assertIsNotNone(self.activationkey.wait_until_element( common_locators['alert.error_sub_form'])) self.assertIsNone(self.activationkey.search(new_name))
def test_negative_update_name(self): """Update invalid name in partition table :id: 704e8336-e14a-4d1a-b9db-2f81c8af6ecc :expectedresults: Partition table is not updated. Appropriate error shown. :CaseImportance: Critical """ name = gen_string('alphanumeric') with Session(self) as session: make_partitiontable( session, name=name, template_path=PARTITION_SCRIPT_DATA_FILE, ) self.assertIsNotNone(self.partitiontable.search(name)) for new_name in invalid_names_list(): with self.subTest(new_name): self.partitiontable.update(name, new_name=new_name) self.assertIsNotNone( self.partitiontable.wait_until_element( common_locators['name_haserror']) ) self.assertIsNone(self.partitiontable.search(new_name))
def test_negative_create_libvirt_with_invalid_name(self): """Create a new libvirt Compute Resource with incorrect values only :id: 4d9be6b5-f9d4-402e-ad13-843335d83879 :expectedresults: A libvirt Compute Resource is not created :CaseImportance: Critical """ include_list = [' '] with Session(self) as session: for name in invalid_names_list() + include_list: with self.subTest(name): make_resource( session, name=name, provider_type=FOREMAN_PROVIDERS['libvirt'], parameter_list=[ ['URL', self.current_libvirt_url, 'field'] ], ) self.assertIsNotNone( self.compute_resource.wait_until_element( common_locators["name_haserror"] ) )
def test_negative_create_scap_policy_with_invalid_name(self): """Create scap policy with invalid name :id: 0d163968-7759-4cfd-9c4d-98533d8db925 :setup: 1. Oscap should be enabled. 2. Oscap-cli hammer plugin installed. :steps: 1. Login to hammer shell. 2. Execute "policy" command with "create" as sub-command. 3. Pass valid parameters and invalid name. :expectedresults: The policy is not created. """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(CLIFactoryError): make_scap_policy({ 'name': name, 'scap-content-id': self.scap_id_rhel6, 'scap-content-profile-id': self.scap_profile_id_rhel6, 'period': OSCAP_PERIOD['weekly'].lower(), 'weekday': OSCAP_WEEKDAY['friday'].lower() })
def test_negative_create_with_invalid_limit(self): """Create Activation key with invalid Usage Limit. Both with too long numbers and using letters. :id: 71ecf5b2-ce4f-41b0-b30d-45f89713f8c1 :expectedresults: Activation key is not created. Appropriate error shown. :CaseLevel: Integration """ with Session(self) as session: for limit in invalid_names_list(): with self.subTest(limit): name = gen_string('alpha') make_activationkey( session, org=self.organization.name, name=name, env=ENVIRONMENT, limit=limit, ) self.assertIsNotNone(self.activationkey.wait_until_element( common_locators['invalid_limit'])) self.assertIsNone(self.activationkey.search(name))
def test_negative_create_rhev_with_invalid_name(self): """Create a new rhev Compute Resource with incorrect values only @id: 5598b123-b6ad-4bdf-b192-2b1ccc2f41eb @setup: rhev hostname and credentials. @steps: 1. Create a compute resource of type rhev. 2. Provide it with the valid hostname, username and password. 3. Provide a invalid name to rhev Compute Resource. 4. Test the connection using Load Datacenter and submit. @CaseAutomation: Automated @Assert: A rhev Compute Resource is not created """ parameter_list = [ ["URL", self.rhev_url, "field"], ["Username", self.rhev_username, "field"], ["Password", self.rhev_password, "field"], ["Datacenter", self.rhev_datacenter, "special select"], ] with Session(self.browser) as session: for name in invalid_names_list(): with self.subTest(name): make_resource( session, name=name, provider_type=FOREMAN_PROVIDERS["rhev"], parameter_list=parameter_list ) self.assertIsNotNone(self.compute_resource.wait_until_element(common_locators["name_haserror"]))
def test_negative_update_name_for_imported_content(self): """Create gpg key with valid name and valid gpg key via file import then fail to update its name :id: 969aad7c-ba4c-4d1d-84a5-c9e1b9130867 :expectedresults: gpg key is not updated :CaseImportance: Critical """ name = gen_string('alpha') with Session(self) as session: make_gpgkey( session, key_path=self.key_path, name=name, org=self.organization.name, upload_key=True, ) self.assertIsNotNone(self.gpgkey.search(name)) for new_name in invalid_names_list(): with self.subTest(new_name): self.gpgkey.update(name, new_name) self.assertIsNotNone( self.gpgkey.wait_until_element( common_locators['alert.error_sub_form'])) self.assertIsNone(self.gpgkey.search(new_name))
def test_negative_create_scap_content_with_invalid_originalfile_name(self): """Create scap-content with invalid original file name :id: 83feb67a-a6bf-4a99-923d-889e8d1013fa :setup: 1. Oscap should be enabled. 2. Oscap-cli hammer plugin installed. 3. Scap data stream ".xml" file. :steps: 1. Login to hammer shell. 2. Execute "scap-content" command with "create" as sub-command. 3. Pass valid parameters and invalid title. :expectedresults: The scap-content is not created. :CaseImportance: Critical """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(CLIFactoryError): make_scapcontent({ 'original-filename': name, 'scap-file': '/tmp/{0}'.format(self.file_name) })
def test_negative_update_name(self): """Update invalid name in partition table :id: 704e8336-e14a-4d1a-b9db-2f81c8af6ecc :expectedresults: Partition table is not updated. Appropriate error shown. :CaseImportance: Critical """ name = gen_string('alphanumeric') with Session(self.browser) as session: make_partitiontable( session, name=name, template_path=PARTITION_SCRIPT_DATA_FILE, ) self.assertIsNotNone(self.partitiontable.search(name)) for new_name in invalid_names_list(): with self.subTest(new_name): self.partitiontable.update(name, new_name=new_name) self.assertIsNotNone( self.partitiontable.wait_until_element( common_locators['name_haserror']) ) self.assertIsNone(self.partitiontable.search(new_name))
def test_filtered_datapoint_True(self): """Tests if run_one_datapoint=false returns all data points""" settings.run_one_datapoint = False self.assertEqual(len(generate_strings_list()), 7) self.assertEqual(len(invalid_emails_list()), 8) self.assertEqual(len(invalid_id_list()), 4) self.assertEqual(len(invalid_interfaces_list()), 8) self.assertEqual(len(invalid_names_list()), 7) self.assertEqual(len(invalid_values_list()), 10) self.assertEqual(len(invalid_usernames_list()), 4) self.assertEqual(len(valid_labels_list()), 2) self.assertEqual(len(valid_data_list()), 7) self.assertEqual(len(valid_emails_list()), 8) self.assertEqual(len(valid_environments_list()), 4) self.assertEqual(len(valid_hosts_list()), 3) self.assertEqual(len(valid_hostgroups_list()), 7) self.assertEqual(len(valid_interfaces_list()), 3) self.assertEqual(len(valid_names_list()), 15) self.assertEqual(len(valid_org_names_list()), 7) self.assertEqual(len(valid_usernames_list()), 6) self.assertEqual(len((valid_cron_expressions())), 4) with mock.patch('robottelo.datafactory.bz_bug_is_open', return_value=True): self.assertEqual(len(valid_docker_repository_names()), 6) with mock.patch('robottelo.datafactory.bz_bug_is_open', return_value=False): self.assertEqual(len(valid_docker_repository_names()), 7)
def test_return_type(self): """This test validates return types for functions: 1. :meth:`robottelo.datafactory.generate_strings_list` 2. :meth:`robottelo.datafactory.invalid_emails_list` 3. :meth:`robottelo.datafactory.invalid_names_list` 4. :meth:`robottelo.datafactory.valid_data_list` 5. :meth:`robottelo.datafactory.valid_emails_list` 6. :meth:`robottelo.datafactory.valid_environments_list` 7. :meth:`robottelo.datafactory.valid_labels_list` 8. :meth:`robottelo.datafactory.valid_names_list` 9. :meth:`robottelo.datafactory.valid_usernames_list` 10. :meth:`robottelo.datafactory.invalid_id_list` """ for item in itertools.chain( generate_strings_list(), invalid_emails_list(), invalid_names_list(), valid_data_list(), valid_emails_list(), valid_environments_list(), valid_labels_list(), valid_names_list(), valid_usernames_list(),): self.assertIsInstance(item, six.text_type) for item in invalid_id_list(): if not (isinstance(item, (six.text_type, int)) or item is None): self.fail('Unexpected data type')
def test_negative_create_scap_content_with_invalid_originalfile_name(self): """Create scap-content with invalid original file name :id: 83feb67a-a6bf-4a99-923d-889e8d1013fa :setup: 1. Oscap should be enabled. 2. Oscap-cli hammer plugin installed. 3. Scap data stream ".xml" file. :steps: 1. Login to hammer shell. 2. Execute "scap-content" command with "create" as sub-command. 3. Pass valid parameters and invalid title. :expectedresults: The scap-content is not created. :CaseImportance: Critical """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(CLIFactoryError): make_scapcontent({ 'original-filename': name, 'scap-file': '/tmp/{0}'.format(self.file_name)})
def test_negative_update_name_for_imported_content(self): """Create gpg key with valid name and valid gpg key via file import then fail to update its name :id: 969aad7c-ba4c-4d1d-84a5-c9e1b9130867 :expectedresults: gpg key is not updated :CaseImportance: Critical """ name = gen_string('alpha') with Session(self) as session: make_gpgkey( session, key_path=self.key_path, name=name, org=self.organization.name, upload_key=True, ) self.assertIsNotNone(self.gpgkey.search(name)) for new_name in invalid_names_list(): with self.subTest(new_name): self.gpgkey.update(name, new_name) self.assertIsNotNone(self.gpgkey.wait_until_element( common_locators['alert.error_sub_form'] )) self.assertIsNone(self.gpgkey.search(new_name))
def test_negative_create_scap_content_with_invalid_title(self): """Create scap-content with invalid title :id: 90a2590e-a6ff-41f1-9e0a-67d4b16435c0 :setup: 1. Oscap should be enabled. 2. Oscap-cli hammer plugin installed. 3. Scap data stream ".xml" file. :steps: 1. Login to hammer shell. 2. Execute "scap-content" command with "create" as sub-command. 3. Pass valid parameters and invalid title. :expectedresults: The scap-content is not created. :CaseImportance: Critical """ for title in invalid_names_list(): with self.subTest(title): with self.assertRaises(CLIFactoryError): make_scapcontent({ 'title': title, 'scap-file': '/tmp/{0}'.format(self.file_name) })
def test_negative_add_image_rhev_with_invalid_name(self): """Add images to the rhev compute resource :id: 0054b389-1e2f-44d9-a306-0410fc0b9d99 :setup: rhev hostname, credentials and images as templates in rhev. :steps: 1. Create a compute resource of type rhev. 2. Provide it with the valid hostname, username and password. 3. Select the created rhev CR and click images tab. 4. Select "New image", provide it invalid name and valid information. 5. Select the desired template to create the image from and submit. :CaseAutomation: Automated :expectedresults: The image should not be added to the CR """ parameter_list = [ ['URL', self.rhev_url, 'field'], ['Username', self.rhev_username, 'field'], ['Password', self.rhev_password, 'field'], ['X509 Certification Authorities', self.rhev_cacert, 'field'], ['Datacenter', self.rhev_datacenter, 'special select'], ] with Session(self) as session: self.compute_resource.check_image_os(self.rhev_img_os) for img_name in invalid_names_list(): with self.subTest(img_name): # Note: create a new compute resource for each sub test as # using the same uuid image. # the images should not be created, but we need to have the # sub tests isolated, and use the same scenario as positive # test cr_name = gen_string('alpha') make_resource(session, name=cr_name, provider_type=FOREMAN_PROVIDERS['rhev'], parameter_list=parameter_list) self.assertIsNotNone(self.compute_resource.search(cr_name)) parameter_list_img = [ ['Name', img_name], ['Operatingsystem', self.rhev_img_os], ['Architecture', self.rhev_img_arch], ['Username', self.rhev_img_user], ['Password', self.rhev_img_pass], ['uuid', self.rhev_img_name], ] self.compute_resource.add_image(cr_name, parameter_list_img) self.assertIsNotNone( self.compute_resource.wait_until_element( common_locators["name_haserror"])) self.assertNotIn( img_name, self.compute_resource.list_images(cr_name))
def test_filtered_datapoint(self, run_one_datapoint): """Tests if run_one_datapoint=false returns all data points""" if run_one_datapoint: assert len(datafactory.generate_strings_list()) == 1 assert len(datafactory.invalid_emails_list()) == 1 assert len(datafactory.invalid_environments_list()) == 1 assert len(datafactory.invalid_id_list()) == 1 assert len(datafactory.invalid_interfaces_list()) == 1 assert len(datafactory.invalid_names_list()) == 1 assert len(datafactory.invalid_values_list()) == 1 assert len(datafactory.valid_data_list()) == 1 assert len(datafactory.valid_docker_repository_names()) == 1 assert len(datafactory.valid_emails_list()) == 1 assert len(datafactory.valid_environments_list()) == 1 assert len(datafactory.valid_hosts_list()) == 1 assert len(datafactory.valid_hostgroups_list()) == 1 assert len(datafactory.valid_interfaces_list()) == 1 assert len(datafactory.valid_labels_list()) == 1 assert len(datafactory.valid_names_list()) == 1 assert len(datafactory.valid_org_names_list()) == 1 assert len(datafactory.valid_usernames_list()) == 1 assert len(datafactory.valid_cron_expressions()) == 1 else: assert len(datafactory.generate_strings_list()) == 7 assert len(datafactory.invalid_emails_list()) == 8 assert len(datafactory.invalid_environments_list()) == 4 assert len(datafactory.invalid_id_list()) == 4 assert len(datafactory.invalid_interfaces_list()) == 8 assert len(datafactory.invalid_names_list()) == 7 assert len(datafactory.invalid_values_list()) == 10 assert len(datafactory.invalid_usernames_list()) == 4 assert len(datafactory.valid_labels_list()) == 2 assert len(datafactory.valid_data_list()) == 7 assert len(datafactory.valid_emails_list()) == 8 assert len(datafactory.valid_environments_list()) == 4 assert len(datafactory.valid_hosts_list()) == 3 assert len(datafactory.valid_hostgroups_list()) == 7 assert len(datafactory.valid_interfaces_list()) == 3 assert len(datafactory.valid_names_list()) == 15 assert len(datafactory.valid_org_names_list()) == 7 assert len(datafactory.valid_usernames_list()) == 6 assert len(datafactory.valid_cron_expressions()) == 4 assert len(datafactory.valid_docker_repository_names()) == 7
def test_negative_create_with_invalid_lastname(self): """Create User with invalid Lastname @Feature: User - Negative Create @Assert: User is not created. Appropriate error shown. """ for invalid_name in invalid_names_list(): with self.subTest(invalid_name): with self.assertRaises(HTTPError): entities.User(lastname=invalid_name).create()
def test_negative_create_with_too_long_name(self): """Create an environment and provide an invalid name. @id: e2654954-b3a1-4594-a487-bcd0cc8195ad @Assert: The server returns an error. """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.Environment(name=name).create()
def test_negative_create_with_invalid_name(self): """Create configuration template providing an invalid name. @id: 2ec7023f-db4d-49ed-b783-6a4fce79064a @Assert: Configuration Template is not created """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.ConfigTemplate(name=name).create()
def test_negative_create_with_invalid_name(self): """Create activation key providing an invalid name. @id: 5f7051be-0320-4d37-9085-6904025ad909 @Assert: Activation key is not created """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.ActivationKey(name=name).create()
def test_negative_create_with_invalid_name(self): """Create content view providing an invalid name. @id: 261376ca-7d12-41b6-9c36-5f284865243e @Assert: Content View is not created """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.ContentView(name=name).create()
def test_negative_create_url(self): """Attempt to create repository with invalid url. @id: 0bb9fc3f-d442-4437-b5d8-83024bc7ceab @Assert: A repository is not created and error is raised. """ for url in invalid_names_list(): with self.subTest(url): with self.assertRaises(HTTPError): entities.Repository(url=url).create()
def test_negative_create_with_invalid_lastname(self): """Create User with invalid Lastname @id: 59546d26-2b6b-400b-990f-0b5d1c35004e @Assert: User is not created. Appropriate error shown. """ for invalid_name in invalid_names_list(): with self.subTest(invalid_name): with self.assertRaises(HTTPError): entities.User(lastname=invalid_name).create()
def test_negative_create_with_invalid_firstname(self): """Create User with invalid Firstname @id: cb1ca8a9-38b1-4d58-ae32-915b47b91657 @Assert: User is not created. Appropriate error shown. """ for invalid_name in invalid_names_list(): with self.subTest(invalid_name): with self.assertRaises(HTTPError): entities.User(firstname=invalid_name).create()
def test_negative_create_with_invalid_name(self): """Create activation key providing an invalid name. @Assert: Activation key is not created @Feature: ActivationKey """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.ActivationKey(name=name).create()
def test_negative_create_with_invalid_name(self): """Create configuration template providing an invalid name. @Assert: Configuration Template is not created @Feature: Configuration Template """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.ConfigTemplate(name=name).create()
def test_negative_create_url(self): """Attempt to create repository with invalid url. @Assert: A repository is not created and error is raised. @Feature: Repository """ for url in invalid_names_list(): with self.subTest(url): with self.assertRaises(HTTPError): entities.Repository(url=url).create()
def test_negative_add_image_vmware_with_invalid_name(self): """Add images to the vmware compute resource :id: 436324bf-7dcf-4197-b1ca-198492bf0356 :setup: 1. Valid vmware hostname, credentials. 2. Add images as templates in vmware. :steps: 1. Create a compute resource of type vmware. 2. Provide valid hostname, username and password. 3. Select the created vmware CR and click images tab. 4. Select "New image" , provide invalid name and valid information. 5. Select the desired template to create the image from and submit. :expectedresults: The image should not be added to the CR :Caseautomation: Automated :CaseLevel: Integration """ parameter_list = [ ['VCenter/Server', self.vmware_url, 'field'], ['Username', self.vmware_username, 'field'], ['Password', self.vmware_password, 'field'], ['Datacenter', self.vmware_datacenter, 'special select'], ] name = gen_string('alpha') with Session(self) as session: self.compute_resource.check_image_os(self.vmware_img_os) for img_name in invalid_names_list(): with self.subTest(name): make_resource( session, name=name, provider_type=FOREMAN_PROVIDERS['vmware'], parameter_list=parameter_list ) parameter_list_img = [ ['Name', img_name], ['Operatingsystem', self.vmware_img_os], ['Architecture', self.vmware_img_arch], ['Username', self.vmware_img_user], ['Password', self.vmware_img_pass], ['uuid', self.vmware_img_name], ] self.compute_resource.add_image(name, parameter_list_img) self.assertIsNotNone( self.compute_resource.wait_until_element( common_locators["name_haserror"] ))
def test_negative_create_with_too_long_name(self): """Create an environment and provide an invalid name. @Feature: Environment @Assert: The server returns an error. """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.Environment(name=name).create()
def test_negative_create_with_invalid_name(self): """@Test: Create content view providing an invalid name. @Assert: Content View is not created @Feature: Content View """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.ContentView(name=name).create()
def test_negative_create_with_too_long_name(self): """@Test: Create an environment and provide an invalid name. @Feature: Environment @Assert: The server returns an error. """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.Environment(name=name).create()
def test_negative_create_with_invalid_name(self): """Create architecture providing an invalid initial name. set. @Assert: Architecture is not created @Feature: Architecture """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.Architecture(name=name).create()
def test_negative_create_with_invalid_name(self): """Create architecture providing an invalid initial name. set. @id: c740b8c4-8ee3-4481-b041-4eff2faf9055 @Assert: Architecture is not created """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.Architecture(name=name).create()
def test_negative_create_with_invalid_name(self): """Create configuration template providing an invalid name. :id: 2ec7023f-db4d-49ed-b783-6a4fce79064a :expectedresults: Configuration Template is not created :CaseImportance: Critical """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.ConfigTemplate(name=name).create()
def test_negative_create_with_invalid_name(self): """Create activation key providing an invalid name. :id: 5f7051be-0320-4d37-9085-6904025ad909 :expectedresults: Activation key is not created :CaseImportance: Low """ for name in invalid_names_list(): with self.subTest(name): with self.assertRaises(HTTPError): entities.ActivationKey(name=name).create()
def test_negative_create_with_invalid_lastname(self): """Create User with invalid Lastname :id: 59546d26-2b6b-400b-990f-0b5d1c35004e :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ for invalid_name in invalid_names_list(): with self.subTest(invalid_name): with self.assertRaises(HTTPError): entities.User(lastname=invalid_name).create()
def test_negative_create_with_invalid_firstname(self): """Create User with invalid Firstname :id: cb1ca8a9-38b1-4d58-ae32-915b47b91657 :expectedresults: User is not created. Appropriate error shown. :CaseImportance: Critical """ for invalid_name in invalid_names_list(): with self.subTest(invalid_name): with self.assertRaises(HTTPError): entities.User(firstname=invalid_name).create()