def test_negative_create_with_name(self): """Don't create an HostGroup with invalid data. @Feature: HostGroup @Assert: HostGroup is not created. """ for name in invalid_values_list(): with self.subTest(name): with self.assertRaises(CLIReturnCodeError): HostGroup.create({'name': name})
def test_negative_create_with_name(self): """Don't create an HostGroup with invalid data. :id: 853a6d43-129a-497b-94f0-08dc622862f8 :expectedresults: HostGroup is not created. """ for name in invalid_values_list(): with self.subTest(name): with self.assertRaises(CLIReturnCodeError): HostGroup.create({'name': name})
def test_negative_create_with_name(name): """Don't create an HostGroup with invalid data. :id: 853a6d43-129a-497b-94f0-08dc622862f8 :parametrized: yes :expectedresults: HostGroup is not created. """ with pytest.raises(CLIReturnCodeError): HostGroup.create({'name': name})
def test_negative_create_with_name(self): """Don't create an HostGroup with invalid data. @id: 853a6d43-129a-497b-94f0-08dc622862f8 @Assert: HostGroup is not created. """ for name in invalid_values_list(): with self.subTest(name): with self.assertRaises(CLIReturnCodeError): HostGroup.create({'name': name})
def test_negative_create_with_name(self): """Don't create an HostGroup with invalid data. :id: 853a6d43-129a-497b-94f0-08dc622862f8 :expectedresults: HostGroup is not created. :CaseImportance: Critical """ for name in invalid_values_list(): with self.subTest(name): with self.assertRaises(CLIReturnCodeError): HostGroup.create({'name': name})
def test_negative_create_with_architecture_id(self): """Check if hostgroup with invalid architecture id raises proper error @id: 7b7de0fa-aee9-4163-adc2-354c1e720d90 @Assert: Proper error should be raised @BZ: 1354568 """ arch_id = gen_string('numeric', 4) with self.assertRaises(CLIReturnCodeError) as exception: HostGroup.create({ 'name': gen_string('alpha'), 'architecture-id': arch_id }) self.assertIs(exception.exception.stderr, 'Could not find architecture {0}'.format(arch_id))
def test_negative_create_with_domain_id(self): """Check if hostgroup with invalid domain id raises proper error @id: b36c83d6-b27c-4f1a-ac45-6c4999005bf7 @Assert: Proper error should be raised @BZ: 1354568 """ domain_id = gen_string('numeric', 4) with self.assertRaises(CLIReturnCodeError) as exception: HostGroup.create({ 'name': gen_string('alpha'), 'domain-id': domain_id }) self.assertIs(exception.exception.stderr, 'Could not find domain {0}'.format(domain_id))
def test_negative_create_with_subnet_id(self): """Check if hostgroup with invalid subnet id raises proper error @id: c352d7ea-4fc6-4b78-863d-d3ee4c0ad439 @Assert: Proper error should be raised @BZ: 1354568 """ subnet_id = gen_string('numeric', 4) with self.assertRaises(CLIReturnCodeError) as exception: HostGroup.create({ 'name': gen_string('alpha'), 'subnet-id': subnet_id }) self.assertIs(exception.exception.stderr, 'Could not find subnet {0}'.format(subnet_id))
def test_negative_create_with_architecture_id(self): """Check if hostgroup with invalid architecture id raises proper error @id: 7b7de0fa-aee9-4163-adc2-354c1e720d90 @Assert: Proper error should be raised @BZ: 1354568 """ arch_id = gen_string('numeric', 4) with self.assertRaises(CLIReturnCodeError) as exception: HostGroup.create({ 'name': gen_string('alpha'), 'architecture-id': arch_id }) self.assertIs( exception.exception.stderr, 'Could not find architecture {0}'.format(arch_id) )
def test_negative_create_with_domain_id(self): """Check if hostgroup with invalid domain id raises proper error @id: b36c83d6-b27c-4f1a-ac45-6c4999005bf7 @Assert: Proper error should be raised @BZ: 1354568 """ domain_id = gen_string('numeric', 4) with self.assertRaises(CLIReturnCodeError) as exception: HostGroup.create({ 'name': gen_string('alpha'), 'domain-id': domain_id }) self.assertIs( exception.exception.stderr, 'Could not find domain {0}'.format(domain_id) )
def test_negative_create_with_subnet_id(self): """Check if hostgroup with invalid subnet id raises proper error @id: c352d7ea-4fc6-4b78-863d-d3ee4c0ad439 @Assert: Proper error should be raised @BZ: 1354568 """ subnet_id = gen_string('numeric', 4) with self.assertRaises(CLIReturnCodeError) as exception: HostGroup.create({ 'name': gen_string('alpha'), 'subnet-id': subnet_id }) self.assertIs( exception.exception.stderr, 'Could not find subnet {0}'.format(subnet_id) )