mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 20:29:09 +00:00
test: make tests independent of selling price validation
This commit is contained in:
@@ -24,6 +24,7 @@ class TestPOSInvoice(IntegrationTestCase):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
|
cls.enterClassContext(cls.change_settings("Selling Settings", validate_selling_price=0))
|
||||||
make_stock_entry(target="_Test Warehouse - _TC", item_code="_Test Item", qty=800, basic_rate=100)
|
make_stock_entry(target="_Test Warehouse - _TC", item_code="_Test Item", qty=800, basic_rate=100)
|
||||||
frappe.db.sql("delete from `tabTax Rule`")
|
frappe.db.sql("delete from `tabTax Rule`")
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ class UnitTestPosInvoiceMergeLog(UnitTestCase):
|
|||||||
|
|
||||||
|
|
||||||
class TestPOSInvoiceMergeLog(IntegrationTestCase):
|
class TestPOSInvoiceMergeLog(IntegrationTestCase):
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
super().setUpClass()
|
||||||
|
cls.enterClassContext(cls.change_settings("Selling Settings", validate_selling_price=0))
|
||||||
|
|
||||||
def test_consolidated_invoice_creation(self):
|
def test_consolidated_invoice_creation(self):
|
||||||
frappe.db.sql("delete from `tabPOS Invoice`")
|
frappe.db.sql("delete from `tabPOS Invoice`")
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ class TestPricingRule(IntegrationTestCase):
|
|||||||
def setUp(self):
|
def setUp(self):
|
||||||
delete_existing_pricing_rules()
|
delete_existing_pricing_rules()
|
||||||
setup_pricing_rule_data()
|
setup_pricing_rule_data()
|
||||||
|
self.enterClassContext(self.change_settings("Selling Settings", validate_selling_price=0))
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
delete_existing_pricing_rules()
|
delete_existing_pricing_rules()
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
|
|||||||
|
|
||||||
|
|
||||||
class TestProcessStatementOfAccounts(AccountsTestMixin, IntegrationTestCase):
|
class TestProcessStatementOfAccounts(AccountsTestMixin, IntegrationTestCase):
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
super().setUpClass()
|
||||||
|
cls.enterClassContext(cls.change_settings("Selling Settings", validate_selling_price=0))
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.create_company()
|
self.create_company()
|
||||||
self.create_customer()
|
self.create_customer()
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ from erpnext.accounts.utils import get_fiscal_year
|
|||||||
|
|
||||||
|
|
||||||
class TestRepostAccountingLedger(AccountsTestMixin, IntegrationTestCase):
|
class TestRepostAccountingLedger(AccountsTestMixin, IntegrationTestCase):
|
||||||
|
@classmethod
|
||||||
|
def setUpClass(cls):
|
||||||
|
super().setUpClass()
|
||||||
|
cls.enterClassContext(cls.change_settings("Selling Settings", validate_selling_price=0))
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.create_company()
|
self.create_company()
|
||||||
self.create_customer()
|
self.create_customer()
|
||||||
|
|||||||
@@ -75,8 +75,9 @@ class TestSalesInvoice(IntegrationTestCase):
|
|||||||
return w
|
return w
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(self):
|
def setUpClass(cls):
|
||||||
super().setUpClass()
|
super().setUpClass()
|
||||||
|
cls.enterClassContext(cls.change_settings("Selling Settings", validate_selling_price=0))
|
||||||
unlink_payment_on_cancel_of_invoice()
|
unlink_payment_on_cancel_of_invoice()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user