fix: remove transaction commit from tests
This commit is contained in:
parent
acdb26a4bb
commit
8d69ec72a6
@ -1087,8 +1087,6 @@ class TestSalesInvoice(unittest.TestCase):
|
||||
|
||||
actual_qty_1 = get_qty_after_transaction(item_code = "_Test Item", warehouse = "Stores - TCP1")
|
||||
|
||||
frappe.db.commit()
|
||||
|
||||
self.assertEqual(actual_qty_0 - 5, actual_qty_1)
|
||||
|
||||
# outgoing_rate
|
||||
|
@ -45,7 +45,6 @@ class TestProcurementTracker(unittest.TestCase):
|
||||
pr = make_purchase_receipt(po.name)
|
||||
pr.get("items")[0].cost_center = "Main - _TPC"
|
||||
pr.submit()
|
||||
frappe.db.commit()
|
||||
date_obj = datetime.date(datetime.now())
|
||||
|
||||
po.load_from_db()
|
||||
|
@ -74,7 +74,6 @@ class TestDailyWorkSummary(unittest.TestCase):
|
||||
from `tabEmail Queue` as q, `tabEmail Queue Recipient` as r \
|
||||
where q.name = r.parent""", as_dict=1)
|
||||
|
||||
frappe.db.commit()
|
||||
|
||||
def setup_groups(self, hour=None):
|
||||
# setup email to trigger at this hour
|
||||
|
@ -1382,7 +1382,6 @@ def make_sales_order_workflow():
|
||||
|
||||
frappe.get_doc(dict(doctype='Role', role_name='Test Junior Approver')).insert(ignore_if_duplicate=True)
|
||||
frappe.get_doc(dict(doctype='Role', role_name='Test Approver')).insert(ignore_if_duplicate=True)
|
||||
frappe.db.commit()
|
||||
frappe.cache().hdel('roles', frappe.session.user)
|
||||
|
||||
workflow = frappe.get_doc({
|
||||
|
@ -44,7 +44,6 @@ class TestShoppingCartSettings(unittest.TestCase):
|
||||
|
||||
def test_tax_rule_validation(self):
|
||||
frappe.db.sql("update `tabTax Rule` set use_for_shopping_cart = 0")
|
||||
frappe.db.commit()
|
||||
|
||||
cart_settings = self.get_cart_settings()
|
||||
cart_settings.enabled = 1
|
||||
|
@ -47,7 +47,6 @@ def create_test_delivery_note():
|
||||
}
|
||||
)
|
||||
delivery_note.insert()
|
||||
frappe.db.commit()
|
||||
return delivery_note
|
||||
|
||||
|
||||
@ -91,7 +90,6 @@ def create_test_shipment(delivery_notes = None):
|
||||
}
|
||||
)
|
||||
shipment.insert()
|
||||
frappe.db.commit()
|
||||
return shipment
|
||||
|
||||
|
||||
|
@ -371,7 +371,6 @@ class TestStockReconciliation(ERPNextTestCase):
|
||||
"""
|
||||
from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note
|
||||
from erpnext.stock.stock_ledger import NegativeStockError
|
||||
frappe.db.commit()
|
||||
|
||||
item_code = "Backdated-Reco-Cancellation-Item"
|
||||
warehouse = "_Test Warehouse - _TC"
|
||||
@ -394,10 +393,6 @@ class TestStockReconciliation(ERPNextTestCase):
|
||||
repost_exists = bool(frappe.db.exists("Repost Item Valuation", {"voucher_no": sr.name}))
|
||||
self.assertFalse(repost_exists, msg="Negative stock validation not working on reco cancellation")
|
||||
|
||||
# teardown
|
||||
frappe.db.rollback()
|
||||
|
||||
|
||||
def test_valid_batch(self):
|
||||
create_batch_item_with_batch("Testing Batch Item 1", "001")
|
||||
create_batch_item_with_batch("Testing Batch Item 2", "002")
|
||||
|
Loading…
Reference in New Issue
Block a user