refactor: import from new location

This commit is contained in:
David
2024-10-06 11:54:52 +02:00
parent 13eb3c5c14
commit bda415a83d
142 changed files with 423 additions and 384 deletions

View File

@@ -5,7 +5,7 @@
import frappe
from frappe import qb
from frappe.query_builder.functions import Sum
from frappe.tests.utils import FrappeTestCase, change_settings
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, getdate, nowdate
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
@@ -46,7 +46,7 @@ def make_supplier(supplier_name, currency=None):
return supplier_name
class TestAccountsController(FrappeTestCase):
class TestAccountsController(IntegrationTestCase):
"""
Test Exchange Gain/Loss booking on various scenarios.
Test Cases are numbered for better organization
@@ -805,7 +805,9 @@ class TestAccountsController(FrappeTestCase):
self.assertEqual(exc_je_for_si, [])
self.assertEqual(exc_je_for_pe, [])
@change_settings("Stock Settings", {"allow_internal_transfer_at_arms_length_price": 1})
@IntegrationTestCase.change_settings(
"Stock Settings", {"allow_internal_transfer_at_arms_length_price": 1}
)
def test_16_internal_transfer_at_arms_length_price(self):
from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse

View File

@@ -1,11 +1,11 @@
from frappe.tests.utils import FrappeTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.test.accounts_mixin import AccountsTestMixin
from erpnext.controllers.taxes_and_totals import calculate_taxes_and_totals
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
class TestTaxesAndTotals(AccountsTestMixin, FrappeTestCase):
class TestTaxesAndTotals(AccountsTestMixin, IntegrationTestCase):
def test_distributed_discount_amount(self):
so = make_sales_order(do_not_save=1)
so.apply_discount_on = "Net Total"

View File

@@ -4,7 +4,7 @@ import unittest
import frappe
import frappe.utils
from frappe.model import mapper
from frappe.test_runner import make_test_records
from frappe.tests.utils import make_test_records
from frappe.utils import add_months, nowdate

View File

@@ -5,7 +5,7 @@ import copy
from collections import defaultdict
import frappe
from frappe.tests.utils import FrappeTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import cint
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
@@ -25,7 +25,7 @@ from erpnext.subcontracting.doctype.subcontracting_order.subcontracting_order im
)
class TestSubcontractingController(FrappeTestCase):
class TestSubcontractingController(IntegrationTestCase):
def setUp(self):
make_subcontracted_items()
make_raw_materials()