test: make tests independent of selling price validation

This commit is contained in:
David
2024-10-11 07:39:50 +02:00
parent eeee06fd7c
commit c17de26e44
6 changed files with 19 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ class TestPOSInvoice(IntegrationTestCase):
@classmethod
def setUpClass(cls):
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)
frappe.db.sql("delete from `tabTax Rule`")

View File

@@ -28,6 +28,11 @@ class UnitTestPosInvoiceMergeLog(UnitTestCase):
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):
frappe.db.sql("delete from `tabPOS Invoice`")

View File

@@ -28,6 +28,7 @@ class TestPricingRule(IntegrationTestCase):
def setUp(self):
delete_existing_pricing_rules()
setup_pricing_rule_data()
self.enterClassContext(self.change_settings("Selling Settings", validate_selling_price=0))
def tearDown(self):
delete_existing_pricing_rules()

View File

@@ -15,6 +15,11 @@ from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
class TestProcessStatementOfAccounts(AccountsTestMixin, IntegrationTestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.enterClassContext(cls.change_settings("Selling Settings", validate_selling_price=0))
def setUp(self):
self.create_company()
self.create_customer()

View File

@@ -15,6 +15,11 @@ from erpnext.accounts.utils import get_fiscal_year
class TestRepostAccountingLedger(AccountsTestMixin, IntegrationTestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.enterClassContext(cls.change_settings("Selling Settings", validate_selling_price=0))
def setUp(self):
self.create_company()
self.create_customer()

View File

@@ -75,8 +75,9 @@ class TestSalesInvoice(IntegrationTestCase):
return w
@classmethod
def setUpClass(self):
def setUpClass(cls):
super().setUpClass()
cls.enterClassContext(cls.change_settings("Selling Settings", validate_selling_price=0))
unlink_payment_on_cancel_of_invoice()
@classmethod