def test_vm_compliance_policy_crud(request, soft_assert): policy = explorer.VMCompliancePolicy(randomness.generate_random_string()) # CR policy.create() soft_assert(policy.exists, "The policy {} does not exist!".format( policy.description )) # U with update(policy): policy.notes = "Modified!" sel.force_navigate("vm_compliance_policy_edit", context={"policy_name": policy.description}) soft_assert(sel.text(policy.form.notes).strip() == "Modified!", "Modification failed!") # D policy.delete() soft_assert(not policy.exists, "The policy {} exists!".format( policy.description ))
def test_vm_compliance_policy_crud(soft_assert): policy = explorer.VMCompliancePolicy(fauxfactory.gen_alphanumeric()) # CR policy.create() soft_assert(policy.exists, "The policy {} does not exist!".format( policy.description )) # U with update(policy): policy.notes = "Modified!" sel.force_navigate("vm_compliance_policy_edit", context={"policy_name": policy.description}) soft_assert(sel.text(policy.form.notes).strip() == "Modified!", "Modification failed!") # D policy.delete() soft_assert(not policy.exists, "The policy {} exists!".format( policy.description ))