From 8ecc14b7bd9d668f7b0e597e8c4a55074bce2620 Mon Sep 17 00:00:00 2001
From: Nabin Hait <nabinhait@gmail.com>
Date: Tue, 13 Dec 2016 14:11:49 +0530
Subject: [PATCH] Revert "email cc test fixes for frappe/frappe#2441"

---
 .../hr/doctype/daily_work_summary/test_daily_work_summary.py   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/erpnext/hr/doctype/daily_work_summary/test_daily_work_summary.py b/erpnext/hr/doctype/daily_work_summary/test_daily_work_summary.py
index 81455f1d17..b8e70e2431 100644
--- a/erpnext/hr/doctype/daily_work_summary/test_daily_work_summary.py
+++ b/erpnext/hr/doctype/daily_work_summary/test_daily_work_summary.py
@@ -56,7 +56,6 @@ class TestDailyWorkSummary(unittest.TestCase):
 			hour = frappe.utils.nowtime().split(':')[0]
 		frappe.db.sql('delete from `tabDaily Work Summary`')
 		frappe.db.sql('delete from `tabEmail Queue`')
-		frappe.db.sql('delete from `tabEmail Queue Recipient`')
 		frappe.db.sql('delete from `tabCommunication`')
 
 		# setup email to trigger at this our
@@ -76,6 +75,6 @@ class TestDailyWorkSummary(unittest.TestCase):
 		employees = frappe.get_all('Employee', fields = ['user_id'],
 			filters=dict(company='_Test Company', status='Active'))
 
-		emails = frappe.db.sql("""select r.recipient, q.message, q.message_id from `tabEmail Queue` as q, `tabEmail Queue Recipient` as r where q.name = r.parent""", as_dict=1)
+		emails = frappe.get_all('Email Queue', fields=['recipient', 'message', 'message_id'])
 
 		return settings, employees, emails
\ No newline at end of file