fix: tests
- specify sorting order in employee exits query - rollback after work order tests
This commit is contained in:
parent
e93694d0ab
commit
bb97309e2e
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
from frappe.query_builder import Order
|
||||||
from frappe.utils import getdate
|
from frappe.utils import getdate
|
||||||
|
|
||||||
|
|
||||||
@ -107,7 +108,7 @@ def get_data(filters):
|
|||||||
interview.status.as_('interview_status'), interview.employee_status.as_('employee_status'),
|
interview.status.as_('interview_status'), interview.employee_status.as_('employee_status'),
|
||||||
interview.reference_document_name.as_('questionnaire'), fnf.name.as_('full_and_final_statement'))
|
interview.reference_document_name.as_('questionnaire'), fnf.name.as_('full_and_final_statement'))
|
||||||
.distinct()
|
.distinct()
|
||||||
.orderby(employee.relieving_date)
|
.orderby(employee.relieving_date, order=Order.asc)
|
||||||
.where(
|
.where(
|
||||||
((employee.relieving_date.isnotnull()) | (employee.relieving_date != ''))
|
((employee.relieving_date.isnotnull()) | (employee.relieving_date != ''))
|
||||||
& ((interview.name.isnull()) | ((interview.name.isnotnull()) & (interview.docstatus != 2)))
|
& ((interview.name.isnull()) | ((interview.name.isnotnull()) & (interview.docstatus != 2)))
|
||||||
|
|||||||
@ -29,6 +29,9 @@ class TestWorkOrder(ERPNextTestCase):
|
|||||||
self.warehouse = '_Test Warehouse 2 - _TC'
|
self.warehouse = '_Test Warehouse 2 - _TC'
|
||||||
self.item = '_Test Item'
|
self.item = '_Test Item'
|
||||||
|
|
||||||
|
def tearDown(self):
|
||||||
|
frappe.db.rollback()
|
||||||
|
|
||||||
def check_planned_qty(self):
|
def check_planned_qty(self):
|
||||||
|
|
||||||
planned0 = frappe.db.get_value("Bin", {"item_code": "_Test FG Item",
|
planned0 = frappe.db.get_value("Bin", {"item_code": "_Test FG Item",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user