Trying to run unit test cases as -
bench --verbose run-tests --doctype 'Email Alert'
Failing with following exceptions. Any idea?
Making for Email Alert
test_alert_disabled_on_wrong_field (frappe.email.doctype.email_alert.test_email_alert.TestEmailAlert) ... ERROR
test_condition (frappe.email.doctype.email_alert.test_email_alert.TestEmailAlert) ... ERROR
test_date_changed (frappe.email.doctype.email_alert.test_email_alert.TestEmailAlert) ... WARNING Property: Unknown Property name. [11:3: overflow-wrap]
ERROR
test_invalid_condition (frappe.email.doctype.email_alert.test_email_alert.TestEmailAlert) ... ok
test_new_and_save (frappe.email.doctype.email_alert.test_email_alert.TestEmailAlert) ... ERROR
test_value_changed (frappe.email.doctype.email_alert.test_email_alert.TestEmailAlert) ... ERROR
======================================================================
ERROR: test_alert_disabled_on_wrong_field (frappe.email.doctype.email_alert.test_email_alert.TestEmailAlert)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/test_email_alert.py", line 121, in test_alert_disabled_on_wrong_field
email_alert.delete()
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 840, in delete
frappe.delete_doc(self.doctype, self.name, flags=self.flags)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/__init__.py", line 673, in delete_doc
ignore_permissions, flags, ignore_on_trash, ignore_missing)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 105, in delete_doc
insert_feed(doc)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/delete_doc.py", line 320, in insert_feed
}).insert(ignore_permissions=True)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 239, in insert
self.run_method("after_insert")
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 757, in run_method
self.run_email_alerts(method)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 807, in run_email_alerts
_evaluate_alert(alert)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 788, in _evaluate_alert
evaluate_alert(self, alert.name, alert.event)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/email/doctype/email_alert/email_alert.py", line 273, in evaluate_alert
frappe.log_error(message=frappe.get_traceback(), title=e)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/__init__.py", line 1370, in log_error
method=title)).insert(ignore_permissions=True)
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/document.py", line 230, in insert
self.db_insert()
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/model/base_document.py", line 303, in db_insert
), list(d.values()))
File "/workspace/Dev/frappe-bench/apps/frappe/frappe/database.py", line 166, in sql
self._cursor.execute(query, values)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py", line 164, in execute
query = self.mogrify(query, args)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py", line 143, in mogrify
query = query % self._escape_args(args, conn)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py", line 118, in _escape_args
return tuple(conn.literal(arg) for arg in args)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/cursors.py", line 118, in <genexpr>
return tuple(conn.literal(arg) for arg in args)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py", line 821, in literal
return self.escape(obj, self.encoders)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/connections.py", line 814, in escape
return escape_item(obj, self.charset, mapping=mapping)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/converters.py", line 27, in escape_item
val = encoder(val, mapping)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/converters.py", line 110, in escape_unicode
return u"'%s'" % _escape_unicode(value)
File "/workspace/Dev/frappe-bench/env/lib/python2.7/site-packages/pymysql/converters.py", line 73, in _escape_unicode
return value.translate(_escape_table)
AttributeError: 'exceptions.NameError' object has no attribute 'translate'
Error -
AttributeError: 'exceptions.NameError' object has no attribute 'translate'