def test_negative_create_same_name(self): """Create organization with valid values, then create a new one with same values @feature: Organization @assert: organization is not created """ for desc, name, label in zip( valid_data_list(), valid_org_names_list(), cycle(valid_labels_list()), ): with self.subTest(desc + name + label): Org.create({ 'description': desc, 'label': label, 'name': name, }) with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': desc, 'label': label, 'name': name, })
def test_negative_create_same_name(self): """Create organization with valid values, then create a new one with same values :id: 07924e1f-1eff-4bae-b0db-e41b84966bc1 :expectedresults: organization is not created :CaseImportance: Critical """ name = valid_org_names_list()[0] desc = valid_data_list()[0] label = valid_labels_list()[0] Org.create({ 'description': desc, 'label': label, 'name': name, }) with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': desc, 'label': label, 'name': name, })
def test_negative_create_same_name(self): """Create organization with valid values, then create a new one with same values @id: 07924e1f-1eff-4bae-b0db-e41b84966bc1 @assert: organization is not created """ for desc, name, label in zip( valid_data_list(), valid_org_names_list(), cycle(valid_labels_list()), ): with self.subTest(desc + name + label): Org.create({ 'description': desc, 'label': label, 'name': name, }) with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': desc, 'label': label, 'name': name, })
def test_negative_create_with_invalid_name(self): """Try to create an organization with invalid name, but valid label and description @id: f0aecf1e-d093-4365-af85-b3650ed21318 @assert: organization is not created """ for name in invalid_values_list(): with self.subTest(name): with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': gen_string('alpha'), 'label': gen_string('alpha'), 'name': name, })
def test_negative_create_name_spaces(self): """@test: Create organization with valid label and description, name is whitespace @feature: Organization @assert: organization is not created """ for test_data in valid_names_simple(): with self.subTest(test_data): with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': test_data, 'label': test_data, 'name': ' \t', })
def test_negative_create_name_long(self): """@test: Create organization with valid label and description, name is too long @feature: Organization @assert: organization is not created """ for test_data in invalid_name_label(): with self.subTest(test_data): with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': test_data['label'], 'label': test_data['label'], 'name': test_data['name'], })
def test_negative_create_with_invalid_name(self): """Try to create an organization with invalid name, but valid label and description @feature: Organization @assert: organization is not created """ for name in invalid_values_list(): with self.subTest(name): with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': gen_string('alpha'), 'label': gen_string('alpha'), 'name': name, })
def test_negative_create_with_invalid_name(self): """Try to create an organization with invalid name, but valid label and description :id: f0aecf1e-d093-4365-af85-b3650ed21318 :expectedresults: organization is not created """ for name in invalid_values_list(): with self.subTest(name): with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': gen_string('alpha'), 'label': gen_string('alpha'), 'name': name, })
def test_negative_create_same_name(self): """@test: Create organization with valid values, then create a new one with same values. @feature: Organization @assert: organization is not created """ for test_data in valid_names_simple(): with self.subTest(test_data): Org.create({ 'description': test_data, 'label': test_data, 'name': test_data, }) with self.assertRaises(CLIReturnCodeError): Org.create({ 'description': test_data, 'label': test_data, 'name': test_data, })