test: fix test `test_leave_balance_near_allocaton_expiry`
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index 697d35a..f8dbd71 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -660,10 +660,7 @@
 		leave_balance_for_consumption = flt(allocation.new_leaves_allocated) + flt(remaining_cf_leaves)
 
 	remaining_leaves = _get_remaining_leaves(leave_balance_for_consumption, allocation.to_date)
-	return {
-		'leave_balance': leave_balance,
-		'leave_balance_for_consumption': remaining_leaves
-	}
+	return frappe._dict(leave_balance=leave_balance, leave_balance_for_consumption=remaining_leaves)
 
 def get_leaves_for_period(employee, leave_type, from_date, to_date, skip_expired_leaves=True):
 	leave_entries = get_leave_entries(employee, leave_type, from_date, to_date)
diff --git a/erpnext/hr/doctype/leave_application/test_leave_application.py b/erpnext/hr/doctype/leave_application/test_leave_application.py
index 22c7a8f..c47bbb8 100644
--- a/erpnext/hr/doctype/leave_application/test_leave_application.py
+++ b/erpnext/hr/doctype/leave_application/test_leave_application.py
@@ -506,8 +506,10 @@
 		leave_type.insert()
 
 		create_carry_forwarded_allocation(employee, leave_type)
+		details = get_leave_balance_on(employee.name, leave_type.name, nowdate(), add_days(nowdate(), 8), for_consumption=True)
 
-		self.assertEqual(get_leave_balance_on(employee.name, leave_type.name, nowdate(), add_days(nowdate(), 8)), 21)
+		self.assertEqual(details.leave_balance_for_consumption, 21)
+		self.assertEqual(details.leave_balance, 30)
 
 	def test_earned_leaves_creation(self):