fix:variable names
diff --git a/erpnext/crm/doctype/appointment/test_appointment.py b/erpnext/crm/doctype/appointment/test_appointment.py
index 16a370e..852e0f1 100644
--- a/erpnext/crm/doctype/appointment/test_appointment.py
+++ b/erpnext/crm/doctype/appointment/test_appointment.py
@@ -47,5 +47,5 @@
         self.assertEqual(cal_event.starts_on ,self.test_appointment.scheduled_time)
 
     def test_lead_linked(self):
-        lead = frappe.get_doc('Lead',self.lead)
+        lead = frappe.get_doc('Lead',self.test_lead)
         self.assertIsNotNone(lead)
\ No newline at end of file