def test_positive_add_and_remove_parameter(module_org): """Remove a parameter from organization :id: e4099279-4e73-4c14-9e7c-912b3787b99f :expectedresults: Parameter is removed from the org :CaseImportance: Critical """ param_name = gen_string('alpha') param_new_value = gen_string('alpha') org_info = Org.info({'id': module_org.id}) assert len(org_info['parameters']) == 0 # Create parameter Org.set_parameter( {'name': param_name, 'value': gen_string('alpha'), 'organization-id': module_org.id} ) org_info = Org.info({'id': module_org.id}) assert len(org_info['parameters']) == 1 # Update Org.set_parameter( {'name': param_name, 'value': param_new_value, 'organization': module_org.name} ) org_info = Org.info({'id': module_org.id}) assert len(org_info['parameters']) == 1 assert param_new_value == org_info['parameters'][param_name.lower()] # Delete parameter Org.delete_parameter({'name': param_name, 'organization': module_org.name}) org_info = Org.info({'id': module_org.id}) assert len(org_info['parameters']) == 0 assert param_name.lower() not in org_info['parameters']
def test_positive_remove_parameter_by_org_name(self): """Remove a parameter from organization :id: e4099279-4e73-4c14-9e7c-912b3787b99f :expectedresults: Parameter is removed from the org :CaseImportance: Critical """ param_name = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': gen_string('alpha'), 'organization': org['name'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) Org.delete_parameter({ 'name': param_name, 'organization': org['name'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 0) self.assertNotIn(param_name.lower(), org['parameters'])
def test_positive_update_parameter(self): """Update a parameter associated with organization @id: 4a7ed165-a0c5-4ba6-833a-5a1b3ee47ace @Assert: Parameter is updated """ param_name = gen_string('alpha') param_new_value = gen_string('alpha') org = make_org() # Create parameter Org.set_parameter({ 'name': param_name, 'value': gen_string('alpha'), 'organization': org['name'], }) result = Org.info({'id': org['id']}) self.assertEqual(len(result['parameters']), 1) Org.set_parameter({ 'name': param_name, 'value': param_new_value, 'organization': org['name'], }) result = Org.info({'id': org['id']}) self.assertEqual(len(result['parameters']), 1) self.assertEqual( param_new_value, result['parameters'][param_name.lower()])
def test_positive_remove_parameter_by_org_id(self): """Remove a parameter from organization :id: 9b0e7c5c-32cd-4428-8798-3469599c9b05 :expectedresults: Parameter is removed from the org :CaseImportance: Critical """ param_name = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': gen_string('alpha'), 'organization-id': org['id'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) Org.delete_parameter({ 'name': param_name, 'organization-id': org['id'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 0) self.assertNotIn(param_name.lower(), org['parameters'])
def test_positive_remove_parameter_by_org_id(self): """Remove a parameter from organization :id: 9b0e7c5c-32cd-4428-8798-3469599c9b05 :expectedresults: Parameter is removed from the org :CaseImportance: Critical """ param_name = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': gen_string('alpha'), 'organization-id': org['id'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) Org.delete_parameter({ 'name': param_name, 'organization-id': org['id'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 0) self.assertNotIn(param_name.lower(), org['parameters'])
def test_positive_update_parameter(self): """Update a parameter associated with organization :id: 4a7ed165-a0c5-4ba6-833a-5a1b3ee47ace :expectedresults: Parameter is updated :CaseImportance: Critical """ param_name = gen_string('alpha') param_new_value = gen_string('alpha') org = make_org() # Create parameter Org.set_parameter({ 'name': param_name, 'value': gen_string('alpha'), 'organization': org['name'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) Org.set_parameter({ 'name': param_name, 'value': param_new_value, 'organization': org['name'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) self.assertEqual( param_new_value, org['parameters'][param_name.lower()])
def test_positive_remove_parameter_by_org_name(self): """Remove a parameter from organization :id: e4099279-4e73-4c14-9e7c-912b3787b99f :expectedresults: Parameter is removed from the org :CaseImportance: Critical """ param_name = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': gen_string('alpha'), 'organization': org['name'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) Org.delete_parameter({ 'name': param_name, 'organization': org['name'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 0) self.assertNotIn(param_name.lower(), org['parameters'])
def test_positive_add_parameter(self): """Add a parameter to organization @id: b0b59650-5718-45e2-8724-151dc52b1486 @Assert: Parameter is added to the org """ param_name = gen_string('alpha') param_value = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': param_value, 'organization': org['name'], }) result = Org.info({'id': org['id']}) self.assertEqual(len(result['parameters']), 1) self.assertEqual(param_value, result['parameters'][param_name.lower()])
def test_positive_add_and_remove_parameter(self): """Remove a parameter from organization :id: e4099279-4e73-4c14-9e7c-912b3787b99f :expectedresults: Parameter is removed from the org :CaseImportance: Critical """ param_name = gen_string('alpha') param_new_value = gen_string('alpha') org_info = Org.info({'id': self.org['id']}) self.assertEqual(len(org_info['parameters']), 0) # Create parameter Org.set_parameter({ 'name': param_name, 'value': gen_string('alpha'), 'organization-id': self.org['id'], }) org_info = Org.info({'id': self.org['id']}) self.assertEqual(len(org_info['parameters']), 1) # Update Org.set_parameter({ 'name': param_name, 'value': param_new_value, 'organization': self.org['name'], }) org_info = Org.info({'id': self.org['id']}) self.assertEqual(len(org_info['parameters']), 1) self.assertEqual(param_new_value, org_info['parameters'][param_name.lower()]) # Delete parameter Org.delete_parameter({ 'name': param_name, 'organization': self.org['name'], }) org_info = Org.info({'id': self.org['id']}) self.assertEqual(len(org_info['parameters']), 0) self.assertNotIn(param_name.lower(), org_info['parameters'])
def test_positive_add_parameter_by_org_id(self): """Add a parameter to organization :id: bb76f67e-5329-4777-b563-3fe4ebffc9ce :expectedresults: Parameter is added to the org :CaseImportance: Critical """ param_name = gen_string('alpha') param_value = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': param_value, 'organization-id': org['id'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) self.assertEqual(param_value, org['parameters'][param_name.lower()])
def test_positive_add_parameter_by_org_name(self): """Add a parameter to organization :id: b0b59650-5718-45e2-8724-151dc52b1486 :expectedresults: Parameter is added to the org :CaseImportance: Critical """ param_name = gen_string('alpha') param_value = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': param_value, 'organization': org['name'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) self.assertEqual(param_value, org['parameters'][param_name.lower()])
def test_positive_add_parameter_by_org_id(self): """Add a parameter to organization :id: bb76f67e-5329-4777-b563-3fe4ebffc9ce :expectedresults: Parameter is added to the org :CaseImportance: Critical """ param_name = gen_string('alpha') param_value = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': param_value, 'organization-id': org['id'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) self.assertEqual(param_value, org['parameters'][param_name.lower()])
def test_positive_add_parameter_by_org_name(self): """Add a parameter to organization :id: b0b59650-5718-45e2-8724-151dc52b1486 :expectedresults: Parameter is added to the org :CaseImportance: Critical """ param_name = gen_string('alpha') param_value = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': param_value, 'organization': org['name'], }) org = Org.info({'id': org['id']}) self.assertEqual(len(org['parameters']), 1) self.assertEqual(param_value, org['parameters'][param_name.lower()])
def test_positive_remove_parameter(self): """Remove a parameter from organization @id: e4099279-4e73-4c14-9e7c-912b3787b99f @Assert: Parameter is removed from the org """ param_name = gen_string('alpha') org = make_org() Org.set_parameter({ 'name': param_name, 'value': gen_string('alpha'), 'organization': org['name'], }) result = Org.info({'id': org['id']}) self.assertEqual(len(result['parameters']), 1) Org.delete_parameter({ 'name': param_name, 'organization': org['name'], }) self.assertEqual(len(result['parameters']), 0) self.assertNotIn(param_name.lower(), result['parameters'])