8000 test: Make email accounts in email_account test by surajshetty3416 · Pull Request #11139 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

test: Make email accounts in email_account test #11139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 29, 2020
7 changes: 4 additions & 3 deletions frappe/core/doctype/server_script/test_server_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ def setUpClass(cls):

frappe.db.commit()

# @classmethod
# def tearDownClass(cls):
# frappe.db.sql('truncate `tabServer Script`')
@classmethod
def tearDownClass(cls):
frappe.db.commit()
frappe.db.sql('truncate `tabServer Script`')

def setUp(self):
frappe.cache().delete_value('server_script_map')
Expand Down
5 changes: 4 additions & 1 deletion frappe/email/doctype/email_account/test_email_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
import frappe, os
import unittest, email

test_records = frappe.get_test_records('Email Account')
from frappe.test_runner import make_test_records

make_test_records("User")
make_test_records("Email Account")

from frappe.core.doctype.communication.email import make
from frappe.desk.form.load import get_attachments
Expand Down
2 changes: 1 addition & 1 deletion frappe/model/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,4 @@ def set_workflow_state_on_action(doc, workflow_name, action):
for state in workflow.states:
if state.doc_status == docstatus:
doc.set(workflow_state_field, state.state)
return
return
1 change: 1 addition & 0 deletions frappe/tests/test_naming.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def test_revert_series(self):
series = 'TEST-'
key = 'TEST-'
name = 'TEST-00003'
frappe.db.sql("DELETE FROM `tabSeries` WHERE `name`=%s", series)
frappe.db.sql("""INSERT INTO `tabSeries` (name, current) values (%s, 3)""", (series,))
revert_series_if_last(key, name)
count = frappe.db.sql("""SELECT current from `tabSeries` where name = %s""", series, as_dict=True)[0]
Expand Down
3 changes: 2 additions & 1 deletion frappe/workflow/doctype/workflow/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
class TestWorkflow(unittest.TestCase):
def setUp(self):
frappe.db.sql('DELETE FROM `tabToDo`')
frappe.db.sql("DELETE FROM `tabHas Role` WHERE `role`='Test Approver'")
if not getattr(self, 'workflow', None):
self.workflow = create_todo_workflow()
frappe.set_user('Administrator')
Expand Down Expand Up @@ -146,4 +147,4 @@ def create_todo_workflow():
return workflow

def create_new_todo():
return frappe.get_doc(dict(doctype='ToDo', description='workflow ' + random_string(10))).insert()
return frappe.get_doc(dict(doctype='ToDo', description='workflow ' + random_string(10))).insert()
0