def test_onboarding(context): """Test Onboarding""" step("Onboard new user") test_user, test_org = onboarding.onboard(context, check_email=False) step("Check that user is created") users = User.cf_api_get_all_users() assert test_user in users step("Check that organization is created") org_list = Organization.api_get_list() assert test_org in org_list
def test_rename_organization(self, context): step("Create an organization") test_org = Organization.api_create(context) step("Update the organization, giving it new name") new_name = "new-{}".format(test_org.name) test_org.rename(new_name) step( "Check that the organization with new name is on the organization list" ) orgs = Organization.api_get_list() assert test_org in orgs
def test_create_delete_organization(self, context): step("Create an organization") test_org = Organization.api_create(context) step("Check that the organization is on the organization list") orgs = Organization.api_get_list() assert test_org in orgs step("Delete the organization") test_org.api_delete() step("Check that the organization is not on org list") assertions.assert_not_in_with_retry(test_org, Organization.api_get_list)
def test_create_and_delete_org_with_special_name(self, org_name, context): step("Create an organization") test_org = Organization.api_create(context, name=org_name) assert org_name == test_org.name step("Check that the organization is on the organization list") orgs = Organization.api_get_list() assert test_org in orgs step("Delete the organization") test_org.api_delete() step("Check that the organization is not on org list") assertions.assert_not_in_with_retry(test_org, Organization.api_get_list)
def test_create_and_delete_organization(context): """Create and Delete Organization""" step("Create organization") test_org = Organization.api_create(context) step("Check that organization is on the list") orgs = Organization.api_get_list() assert test_org in orgs step("Delete organization") test_org.api_delete() step("Check that the organization is not on the list") assertions.assert_not_in_with_retry(test_org, Organization.api_get_list)