def METHOD_NAME(
	job_name: str, status: Literal["Success", "Pending", "Running", "Failure"]
):
	"""Fakes agent job request and response. Also polls the job."""
	with responses.mock, patch.object(
		AgentJob, "before_insert", fake_agent_job_req(job_name, status), create=True
	), patch(
		"press.press.doctype.agent_job.agent_job.frappe.enqueue_doc",
		new=foreground_enqueue_doc,
	), patch(
		"press.press.doctype.agent_job.agent_job.frappe.db.commit", new=Mock()
	), patch(
		"press.press.doctype.agent_job.agent_job.frappe.db.rollback", new=Mock()
	):
		frappe.local.role_permissions = (
			{}
		)  # due to bug in FF related to only_if_creator docperm
		yield