From d65458d5346f30b2d3d90cab1ab49027dae51d62 Mon Sep 17 00:00:00 2001 From: Walstan Baptista <38958184+walstanb@users.noreply.github.com> Date: Wed, 31 Mar 2021 12:14:41 +0530 Subject: [PATCH 1/2] test: corrected item name (#25075) --- erpnext/manufacturing/doctype/routing/test_routing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/routing/test_routing.py b/erpnext/manufacturing/doctype/routing/test_routing.py index 73d05a6157..7071bc1ab0 100644 --- a/erpnext/manufacturing/doctype/routing/test_routing.py +++ b/erpnext/manufacturing/doctype/routing/test_routing.py @@ -74,7 +74,7 @@ def setup_bom(**args): }) if not args.raw_materials: - if not frappe.db.exists('Item', "Test Extra Item 1"): + if not frappe.db.exists('Item', "Test Extra Item N-1"): make_item("Test Extra Item N-1", { 'is_stock_item': 1, }) @@ -88,4 +88,4 @@ def setup_bom(**args): else: bom_doc = frappe.get_doc("BOM", name) - return bom_doc \ No newline at end of file + return bom_doc From 353aa59c42798152f036167c704b9fe23c69321b Mon Sep 17 00:00:00 2001 From: Walstan Baptista <38958184+walstanb@users.noreply.github.com> Date: Wed, 31 Mar 2021 12:16:54 +0530 Subject: [PATCH 2/2] test: sets company while making a project (#25061) --- erpnext/projects/doctype/project/test_project.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/erpnext/projects/doctype/project/test_project.py b/erpnext/projects/doctype/project/test_project.py index 15a2873ade..a92bad1d5a 100644 --- a/erpnext/projects/doctype/project/test_project.py +++ b/erpnext/projects/doctype/project/test_project.py @@ -4,12 +4,14 @@ from __future__ import unicode_literals import frappe, unittest -test_records = frappe.get_test_records('Project') -test_ignore = ["Sales Order"] +from frappe.utils import getdate, nowdate, add_days from erpnext.projects.doctype.project_template.test_project_template import make_project_template from erpnext.projects.doctype.task.test_task import create_task -from frappe.utils import getdate, nowdate, add_days + +test_records = frappe.get_test_records('Project') +test_ignore = ["Sales Order"] + class TestProject(unittest.TestCase): def test_project_with_template_having_no_parent_and_depend_tasks(self): @@ -112,7 +114,8 @@ def make_project(args): doctype = 'Project', project_name = args.project_name, status = 'Open', - expected_start_date = args.start_date + expected_start_date = args.start_date, + company= args.company or '_Test Company' )) if args.project_template_name: