chore: Drop empty UnitTestCase

This commit is contained in:
Ankush Menat
2025-06-10 10:54:04 +05:30
parent c8cec8cedf
commit c222d5fa55
87 changed files with 87 additions and 864 deletions

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestAccountClosingBalance(UnitTestCase):
"""
Unit tests for AccountClosingBalance.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestAccountClosingBalance(IntegrationTestCase):

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import nowdate, today
from erpnext.accounts.doctype.payment_entry.test_payment_entry import get_payment_entry

View File

@@ -2,21 +2,12 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import nowdate
from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import create_bank_account
class UnitTestBankTransaction(UnitTestCase):
"""
Unit tests for BankTransaction.
Use this class for testing individual functions and methods.
"""
pass
class TestAutoMatchParty(IntegrationTestCase):
@classmethod
def setUpClass(cls):

View File

@@ -6,7 +6,7 @@ import json
import frappe
from frappe import utils
from frappe.model.docstatus import DocStatus
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.bank_reconciliation_tool.bank_reconciliation_tool import (
get_linked_payments,
@@ -24,15 +24,6 @@ from erpnext.tests.utils import if_lending_app_installed
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item", "Cost Center"]
class UnitTestBankTransaction(UnitTestCase):
"""
Unit tests for BankTransaction.
Use this class for testing individual functions and methods.
"""
pass
class TestBankTransaction(IntegrationTestCase):
def setUp(self):
make_pos_profile()

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestBisectAccountingStatements(UnitTestCase):
"""
Unit tests for BisectAccountingStatements.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestBisectAccountingStatements(IntegrationTestCase):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestBisectNodes(UnitTestCase):
"""
Unit tests for BisectNodes.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestBisectNodes(IntegrationTestCase):

View File

@@ -4,7 +4,7 @@ import json
import frappe
from frappe.model import mapper
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, nowdate, today
from erpnext import get_default_cost_center
@@ -22,15 +22,6 @@ from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import (
EXTRA_TEST_RECORD_DEPENDENCIES = ["Company", "Cost Center"]
class UnitTestDunning(UnitTestCase):
"""
Unit tests for Dunning.
Use this class for testing individual functions and methods.
"""
pass
class TestDunning(IntegrationTestCase):
@classmethod
def setUpClass(cls):

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import flt, nowdate
from erpnext.accounts.doctype.account.test_account import get_inventory_account
@@ -10,15 +10,6 @@ from erpnext.accounts.doctype.journal_entry.journal_entry import StockAccountInv
from erpnext.exceptions import InvalidAccountCurrency
class UnitTestJournalEntry(UnitTestCase):
"""
Unit tests for JournalEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestJournalEntry(IntegrationTestCase):
@IntegrationTestCase.change_settings(
"Accounts Settings", {"unlink_payment_on_cancellation_of_invoice": 1}

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestLedgerHealthMonitor(UnitTestCase):
"""
Unit tests for LedgerHealthMonitor.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestLedgerHealthMonitor(IntegrationTestCase):

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.accounting_dimension.test_accounting_dimension import (
create_dimension,
@@ -15,15 +15,6 @@ from erpnext.accounts.doctype.opening_invoice_creation_tool.opening_invoice_crea
EXTRA_TEST_RECORD_DEPENDENCIES = ["Customer", "Supplier", "Accounting Dimension"]
class UnitTestOpeningInvoiceCreationTool(UnitTestCase):
"""
Unit tests for OpeningInvoiceCreationTool.
Use this class for testing individual functions and methods.
"""
pass
class TestOpeningInvoiceCreationTool(IntegrationTestCase):
@classmethod
def setUpClass(cls):

View File

@@ -4,7 +4,7 @@
import frappe
from frappe import qb
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, flt, nowdate
from erpnext.accounts.doctype.account.test_account import create_account
@@ -28,15 +28,6 @@ from erpnext.setup.doctype.employee.test_employee import make_employee
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item", "Currency Exchange"]
class UnitTestPaymentEntry(UnitTestCase):
"""
Unit tests for PaymentEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentEntry(IntegrationTestCase):
def tearDown(self):
frappe.db.rollback()

View File

@@ -3,7 +3,7 @@
import frappe
from frappe import qb
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import nowdate
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
@@ -13,15 +13,6 @@ from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_orde
from erpnext.stock.doctype.item.test_item import create_item
class UnitTestPaymentLedgerEntry(UnitTestCase):
"""
Unit tests for PaymentLedgerEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentLedgerEntry(IntegrationTestCase):
def setUp(self):
self.ple = qb.DocType("Payment Ledger Entry")

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import getdate
from erpnext.accounts.doctype.bank_transaction.test_bank_transaction import (
@@ -17,15 +17,6 @@ from erpnext.accounts.doctype.payment_entry.payment_entry import (
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
class UnitTestPaymentOrder(UnitTestCase):
"""
Unit tests for PaymentOrder.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentOrder(IntegrationTestCase):
def setUp(self):
# generate and use a uniq hash identifier for 'Bank Account' and it's linked GL 'Account' to avoid validation error

View File

@@ -4,7 +4,7 @@
import frappe
from frappe import qb
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, add_years, flt, getdate, nowdate, today
from frappe.utils.data import getdate as convert_to_date
@@ -21,15 +21,6 @@ from erpnext.stock.doctype.item.test_item import create_item
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item"]
class UnitTestPaymentReconciliation(UnitTestCase):
"""
Unit tests for PaymentReconciliation.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentReconciliation(IntegrationTestCase):
def setUp(self):
self.create_company()

View File

@@ -6,7 +6,7 @@ import unittest
from unittest.mock import patch
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
from erpnext.accounts.doctype.payment_entry.test_payment_entry import create_payment_terms_template
@@ -58,15 +58,6 @@ payment_method = [
]
class UnitTestPaymentRequest(UnitTestCase):
"""
Unit tests for PaymentRequest.
Use this class for testing individual functions and methods.
"""
pass
class TestPaymentRequest(IntegrationTestCase):
def setUp(self):
for payment_gateway in payment_gateways:

View File

@@ -3,7 +3,7 @@
import json
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.pos_closing_entry.test_pos_closing_entry import init_user_and_profile
from erpnext.accounts.doctype.pos_invoice.pos_invoice import make_sales_return
@@ -17,15 +17,6 @@ from erpnext.stock.doctype.serial_and_batch_bundle.test_serial_and_batch_bundle
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
class UnitTestPosInvoiceMergeLog(UnitTestCase):
"""
Unit tests for PosInvoiceMergeLog.
Use this class for testing individual functions and methods.
"""
pass
class TestPOSInvoiceMergeLog(IntegrationTestCase):
@classmethod
def setUpClass(cls):

View File

@@ -5,7 +5,7 @@
import unittest
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.accounts.doctype.purchase_invoice.test_purchase_invoice import make_purchase_invoice
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
@@ -15,15 +15,6 @@ from erpnext.stock.doctype.item.test_item import make_item
from erpnext.stock.get_item_details import get_item_details
class UnitTestPricingRule(UnitTestCase):
"""
Unit tests for PricingRule.
Use this class for testing individual functions and methods.
"""
pass
class TestPricingRule(IntegrationTestCase):
def setUp(self):
delete_existing_pricing_rules()

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestProcessPaymentReconciliation(UnitTestCase):
"""
Unit tests for ProcessPaymentReconciliation.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestProcessPaymentReconciliation(IntegrationTestCase):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestProcessPaymentReconciliationLog(UnitTestCase):
"""
Unit tests for ProcessPaymentReconciliationLog.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestProcessPaymentReconciliationLog(IntegrationTestCase):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestProcessSubscription(UnitTestCase):
"""
Unit tests for ProcessSubscription.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestProcessSubscription(IntegrationTestCase):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestRepostAccountingLedgerSettings(UnitTestCase):
"""
Unit tests for RepostAccountingLedgerSettings.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestRepostAccountingLedgerSettings(IntegrationTestCase):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestRepostPaymentLedger(UnitTestCase):
"""
Unit tests for RepostPaymentLedger.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestRepostPaymentLedger(IntegrationTestCase):

View File

@@ -7,7 +7,7 @@ import json
import frappe
from frappe import qb
from frappe.model.dynamic_links import get_dynamic_link_map
from frappe.tests import IntegrationTestCase, UnitTestCase, change_settings
from frappe.tests import IntegrationTestCase, change_settings
from frappe.utils import add_days, flt, format_date, getdate, nowdate, today
import erpnext
@@ -51,15 +51,6 @@ from erpnext.stock.utils import get_incoming_rate, get_stock_balance
from erpnext.tests.utils import ERPNextTestSuite
class UnitTestSalesInvoice(UnitTestCase):
"""
Unit tests for SalesInvoice.
Use this class for testing individual functions and methods.
"""
pass
class TestSalesInvoice(ERPNextTestSuite):
def setUp(self):
from erpnext.stock.doctype.stock_ledger_entry.test_stock_ledger_entry import create_items

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils.data import (
add_days,
add_months,
@@ -21,15 +21,6 @@ from erpnext.accounts.doctype.subscription.subscription import get_prorata_facto
EXTRA_TEST_RECORD_DEPENDENCIES = ("UOM", "Item Group", "Item")
class UnitTestSubscription(UnitTestCase):
"""
Unit tests for Subscription.
Use this class for testing individual functions and methods.
"""
pass
class TestSubscription(IntegrationTestCase):
def setUp(self):
make_plans()

View File

@@ -6,7 +6,7 @@ import unittest
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_fields
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, add_months, today
from erpnext.accounts.doctype.payment_entry.payment_entry import get_payment_entry
@@ -16,15 +16,6 @@ from erpnext.buying.doctype.purchase_order.purchase_order import make_purchase_i
EXTRA_TEST_RECORD_DEPENDENCIES = ["Supplier Group", "Customer Group"]
class UnitTestTaxWithholdingCategory(UnitTestCase):
"""
Unit tests for TaxWithholdingCategory.
Use this class for testing individual functions and methods.
"""
pass
class TestTaxWithholdingCategory(IntegrationTestCase):
@classmethod
def setUpClass(cls):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestAssetActivity(UnitTestCase):
"""
Unit tests for AssetActivity.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestAssetActivity(IntegrationTestCase):

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import cstr, date_diff, flt, getdate
from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice
@@ -20,15 +20,6 @@ from erpnext.assets.doctype.asset_value_adjustment.test_asset_value_adjustment i
)
class UnitTestAssetDepreciationSchedule(UnitTestCase):
"""
Unit tests for AssetDepreciationSchedule.
Use this class for testing individual functions and methods.
"""
pass
class TestAssetDepreciationSchedule(IntegrationTestCase):
def setUp(self):
create_asset_data()

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import cstr
from erpnext.assets.doctype.asset.test_asset import create_asset
@@ -11,15 +11,6 @@ from erpnext.assets.doctype.asset_depreciation_schedule.asset_depreciation_sched
)
class UnitTestAssetShiftAllocation(UnitTestCase):
"""
Unit tests for AssetShiftAllocation.
Use this class for testing individual functions and methods.
"""
pass
class TestAssetShiftAllocation(IntegrationTestCase):
@classmethod
def setUpClass(cls):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestAssetShiftFactor(UnitTestCase):
"""
Unit tests for AssetShiftFactor.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestAssetShiftFactor(IntegrationTestCase):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestBulkTransactionLog(UnitTestCase):
"""
Unit tests for BulkTransactionLog.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestBulkTransactionLog(IntegrationTestCase):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestBulkTransactionLogDetail(UnitTestCase):
"""
Unit tests for BulkTransactionLogDetail.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestBulkTransactionLogDetail(IntegrationTestCase):

View File

@@ -5,7 +5,7 @@
import json
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase, change_settings
from frappe.tests import IntegrationTestCase, change_settings
from frappe.utils import add_days, flt, getdate, nowdate
from frappe.utils.data import today
@@ -28,15 +28,6 @@ from erpnext.stock.doctype.purchase_receipt.purchase_receipt import (
)
class UnitTestPurchaseOrder(UnitTestCase):
"""
Unit tests for PurchaseOrder.
Use this class for testing individual functions and methods.
"""
pass
class TestPurchaseOrder(IntegrationTestCase):
def test_purchase_order_qty(self):
po = create_purchase_order(qty=1, do_not_save=True)

View File

@@ -5,7 +5,7 @@
from urllib.parse import urlparse
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase, change_settings
from frappe.tests import IntegrationTestCase, change_settings
from frappe.utils import nowdate
from erpnext.buying.doctype.request_for_quotation.request_for_quotation import (
@@ -21,15 +21,6 @@ from erpnext.stock.doctype.item.test_item import make_item
from erpnext.templates.pages.rfq import check_supplier_has_docname_access
class UnitTestRequestForQuotation(UnitTestCase):
"""
Unit tests for RequestForQuotation.
Use this class for testing individual functions and methods.
"""
pass
class TestRequestforQuotation(IntegrationTestCase):
def test_rfq_qty(self):
rfq = make_request_for_quotation(qty=0, do_not_save=True)

View File

@@ -11,16 +11,7 @@ from erpnext.exceptions import PartyDisabled
EXTRA_TEST_RECORD_DEPENDENCIES = ["Payment Term", "Payment Terms Template"]
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestSupplier(UnitTestCase):
"""
Unit tests for Supplier.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestSupplier(IntegrationTestCase):

View File

@@ -3,22 +3,13 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase, change_settings
from frappe.tests import IntegrationTestCase, change_settings
from frappe.utils import add_days, today
from erpnext.buying.doctype.supplier_quotation.supplier_quotation import make_purchase_order
from erpnext.controllers.accounts_controller import InvalidQtyError
class UnitTestSupplierQuotation(UnitTestCase):
"""
Unit tests for SupplierQuotation.
Use this class for testing individual functions and methods.
"""
pass
class TestPurchaseOrder(IntegrationTestCase):
def test_supplier_quotation_qty(self):
sq = frappe.copy_doc(self.globalTestRecords["Supplier Quotation"][0])

View File

@@ -3,16 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestSupplierScorecard(UnitTestCase):
"""
Unit tests for SupplierScorecard.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestSupplierScorecard(IntegrationTestCase):

View File

@@ -3,16 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestSupplierScorecardCriteria(UnitTestCase):
"""
Unit tests for SupplierScorecardCriteria.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestSupplierScorecardCriteria(IntegrationTestCase):

View File

@@ -3,22 +3,13 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.buying.doctype.supplier_scorecard_variable.supplier_scorecard_variable import (
VariablePathNotFound,
)
class UnitTestSupplierScorecardVariable(UnitTestCase):
"""
Unit tests for SupplierScorecardVariable.
Use this class for testing individual functions and methods.
"""
pass
class TestSupplierScorecardVariable(IntegrationTestCase):
def test_variable_exist(self):
for d in test_existing_variables:

View File

@@ -1,7 +1,7 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_months, today
from erpnext import get_company_currency
@@ -10,15 +10,6 @@ from erpnext.stock.doctype.item.test_item import make_item
from .blanket_order import make_order
class UnitTestBlanketOrder(UnitTestCase):
"""
Unit tests for BlanketOrder.
Use this class for testing individual functions and methods.
"""
pass
class TestBlanketOrder(IntegrationTestCase):
def setUp(self):
frappe.flags.args = frappe._dict()

View File

@@ -6,7 +6,7 @@ from collections import deque
from functools import partial
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase, timeout
from frappe.tests import IntegrationTestCase, timeout
from frappe.utils import cstr, flt
from erpnext.controllers.tests.test_subcontracting_controller import (
@@ -24,15 +24,6 @@ from erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation import
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item", "Quality Inspection Template"]
class UnitTestBom(UnitTestCase):
"""
Unit tests for Bom.
Use this class for testing individual functions and methods.
"""
pass
class TestBOM(IntegrationTestCase):
@timeout
def test_get_items(self):

View File

@@ -4,7 +4,7 @@
import random
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.manufacturing.doctype.bom_creator.bom_creator import (
add_item,
@@ -13,15 +13,6 @@ from erpnext.manufacturing.doctype.bom_creator.bom_creator import (
from erpnext.stock.doctype.item.test_item import make_item
class UnitTestBomCreator(UnitTestCase):
"""
Unit tests for BomCreator.
Use this class for testing individual functions and methods.
"""
pass
class TestBOMCreator(IntegrationTestCase):
def setUp(self) -> None:
create_items()

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.manufacturing.doctype.bom_update_log.bom_update_log import (
BOMMissingError,
@@ -13,16 +13,6 @@ from erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool import (
enqueue_update_cost,
)
class UnitTestBomUpdateLog(UnitTestCase):
"""
Unit tests for BomUpdateLog.
Use this class for testing individual functions and methods.
"""
pass
EXTRA_TEST_RECORD_DEPENDENCIES = ["BOM"]

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase, timeout
from frappe.tests import IntegrationTestCase, timeout
from erpnext.manufacturing.doctype.bom_update_log.test_bom_update_log import (
update_cost_in_all_boms_in_test,
@@ -11,16 +11,6 @@ from erpnext.manufacturing.doctype.bom_update_tool.bom_update_tool import enqueu
from erpnext.manufacturing.doctype.production_plan.test_production_plan import make_bom
from erpnext.stock.doctype.item.test_item import create_item
class UnitTestBomUpdateTool(UnitTestCase):
"""
Unit tests for BomUpdateTool.
Use this class for testing individual functions and methods.
"""
pass
EXTRA_TEST_RECORD_DEPENDENCIES = ["BOM"]

View File

@@ -5,7 +5,7 @@
from typing import Literal
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import random_string
from frappe.utils.data import add_to_date, now, today
@@ -28,15 +28,6 @@ from erpnext.tests.utils import ERPNextTestSuite
EXTRA_TEST_RECORD_DEPENDENCIES = ["UOM"]
class UnitTestJobCard(UnitTestCase):
"""
Unit tests for JobCard.
Use this class for testing individual functions and methods.
"""
pass
class TestJobCard(ERPNextTestSuite):
@classmethod
def setUpClass(cls):

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestPlantFloor(UnitTestCase):
"""
Unit tests for PlantFloor.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestPlantFloor(IntegrationTestCase):

View File

@@ -1,7 +1,7 @@
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_to_date, flt, getdate, now_datetime, nowdate
from erpnext.controllers.item_variant import create_variant
@@ -27,15 +27,6 @@ from erpnext.stock.doctype.stock_reconciliation.test_stock_reconciliation import
from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import StockReservation
class UnitTestProductionPlan(UnitTestCase):
"""
Unit tests for ProductionPlan.
Use this class for testing individual functions and methods.
"""
pass
class TestProductionPlan(IntegrationTestCase):
def setUp(self):
for item in [

View File

@@ -1,7 +1,7 @@
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.manufacturing.doctype.job_card.job_card import OperationSequenceError
from erpnext.manufacturing.doctype.work_order.test_work_order import make_wo_order_test_record
@@ -10,15 +10,6 @@ from erpnext.stock.doctype.item.test_item import make_item
EXTRA_TEST_RECORD_DEPENDENCIES = ["UOM"]
class UnitTestRouting(UnitTestCase):
"""
Unit tests for Routing.
Use this class for testing individual functions and methods.
"""
pass
class TestRouting(IntegrationTestCase):
@classmethod
def setUpClass(cls):

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase, timeout
from frappe.tests import IntegrationTestCase, timeout
from frappe.utils import add_days, add_months, add_to_date, cint, flt, now, today
from erpnext.manufacturing.doctype.job_card.job_card import JobCardCancelError
@@ -35,15 +35,6 @@ from erpnext.stock.utils import get_bin
EXTRA_TEST_RECORD_DEPENDENCIES = ["BOM"]
class UnitTestWorkOrder(UnitTestCase):
"""
Unit tests for WorkOrder.
Use this class for testing individual functions and methods.
"""
pass
class TestWorkOrder(IntegrationTestCase):
def setUp(self):
self.warehouse = "_Test Warehouse 2 - _TC"

View File

@@ -1,7 +1,7 @@
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors and Contributors
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.manufacturing.doctype.operation.test_operation import make_operation
from erpnext.manufacturing.doctype.routing.test_routing import create_routing, setup_bom
@@ -14,15 +14,6 @@ from erpnext.manufacturing.doctype.workstation.workstation import (
EXTRA_TEST_RECORD_DEPENDENCIES = ["Warehouse"]
class UnitTestWorkstation(UnitTestCase):
"""
Unit tests for Workstation.
Use this class for testing individual functions and methods.
"""
pass
class TestWorkstation(IntegrationTestCase):
def test_validate_timings(self):
check_if_within_operating_hours(

View File

@@ -2,16 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestWorkstationType(UnitTestCase):
"""
Unit tests for WorkstationType.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestWorkstationType(IntegrationTestCase):

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, getdate, nowdate
from erpnext.projects.doctype.project_template.test_project_template import make_project_template
@@ -14,15 +14,6 @@ from erpnext.tests.utils import ERPNextTestSuite
IGNORE_TEST_RECORD_DEPENDENCIES = ["Sales Order"]
class UnitTestProject(UnitTestCase):
"""
Unit tests for Project.
Use this class for testing individual functions and methods.
"""
pass
class TestProject(ERPNextTestSuite):
@classmethod
def setUpClass(cls):

View File

@@ -2,20 +2,11 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from .quality_procedure import add_node
class UnitTestQualityProcedure(UnitTestCase):
"""
Unit tests for QualityProcedure.
Use this class for testing individual functions and methods.
"""
pass
class TestQualityProcedure(IntegrationTestCase):
def test_add_node(self):
procedure = create_procedure(

View File

@@ -5,7 +5,7 @@
import json
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import flt
from erpnext.accounts.party import get_due_date
@@ -21,15 +21,6 @@ IGNORE_TEST_RECORD_DEPENDENCIES = ["Price List"]
EXTRA_TEST_RECORD_DEPENDENCIES = ["Payment Term", "Payment Terms Template"]
class UnitTestCustomer(UnitTestCase):
"""
Unit tests for Customer.
Use this class for testing individual functions and methods.
"""
pass
class TestCustomer(IntegrationTestCase):
def tearDown(self):
set_credit_limit("_Test Customer", "_Test Company", 0)

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.controllers.queries import item_query
@@ -18,15 +18,6 @@ def create_party_specific_item(**args):
psi.insert()
class UnitTestPartySpecificItem(UnitTestCase):
"""
Unit tests for PartySpecificItem.
Use this class for testing individual functions and methods.
"""
pass
class TestPartySpecificItem(IntegrationTestCase):
def setUp(self):
self.customer = frappe.get_last_doc("Customer")

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase, change_settings
from frappe.tests import IntegrationTestCase, change_settings
from frappe.utils import add_days, add_months, flt, getdate, nowdate
from erpnext.controllers.accounts_controller import InvalidQtyError
@@ -10,15 +10,6 @@ from erpnext.controllers.accounts_controller import InvalidQtyError
EXTRA_TEST_RECORD_DEPENDENCIES = ["Product Bundle"]
class UnitTestQuotation(UnitTestCase):
"""
Unit tests for Quotation.
Use this class for testing individual functions and methods.
"""
pass
class TestQuotation(IntegrationTestCase):
def test_quotation_qty(self):
qo = make_quotation(qty=0, do_not_save=True)

View File

@@ -2,16 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestIncoterm(UnitTestCase):
"""
Unit tests for Incoterm.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestIncoterm(IntegrationTestCase):

View File

@@ -3,16 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestTransactionDeletionRecord(UnitTestCase):
"""
Unit tests for TransactionDeletionRecord.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestTransactionDeletionRecord(IntegrationTestCase):

View File

@@ -5,7 +5,7 @@ import json
import frappe
from frappe.exceptions import ValidationError
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import cint, flt
from frappe.utils.data import add_to_date, getdate
@@ -24,15 +24,6 @@ from erpnext.stock.get_item_details import ItemDetailsCtx, get_item_details
from erpnext.stock.serial_batch_bundle import SerialBatchCreation
class UnitTestBatch(UnitTestCase):
"""
Unit tests for Batch.
Use this class for testing individual functions and methods.
"""
pass
class TestBatch(IntegrationTestCase):
def test_item_has_batch_enabled(self):
self.assertRaises(

View File

@@ -2,21 +2,12 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.stock.doctype.item.test_item import make_item
from erpnext.stock.utils import _create_bin
class UnitTestBin(UnitTestCase):
"""
Unit tests for Bin.
Use this class for testing individual functions and methods.
"""
pass
class TestBin(IntegrationTestCase):
def test_concurrent_inserts(self):
"""Ensure no duplicates are possible in case of concurrent inserts"""

View File

@@ -6,7 +6,7 @@ import json
from collections import defaultdict
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, cstr, flt, getdate, nowdate, nowtime, today
from erpnext.accounts.doctype.account.test_account import get_inventory_account
@@ -45,15 +45,6 @@ from erpnext.stock.doctype.warehouse.test_warehouse import get_warehouse
from erpnext.stock.stock_ledger import get_previous_sle
class UnitTestDeliveryNote(UnitTestCase):
"""
Unit tests for DeliveryNote.
Use this class for testing individual functions and methods.
"""
pass
class TestDeliveryNote(IntegrationTestCase):
def test_delivery_note_qty(self):
dn = create_delivery_note(qty=0, do_not_save=True)

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, flt, now_datetime, nowdate
import erpnext
@@ -14,15 +14,6 @@ from erpnext.stock.doctype.delivery_trip.delivery_trip import (
from erpnext.tests.utils import create_test_contact_and_address
class UnitTestDeliveryTrip(UnitTestCase):
"""
Unit tests for DeliveryTrip.
Use this class for testing individual functions and methods.
"""
pass
class TestDeliveryTrip(IntegrationTestCase):
def setUp(self):
super().setUp()

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.custom.doctype.custom_field.custom_field import create_custom_field
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import nowdate, nowtime
from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note
@@ -21,15 +21,6 @@ from erpnext.stock.doctype.stock_ledger_entry.stock_ledger_entry import Inventor
from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse
class UnitTestInventoryDimension(UnitTestCase):
"""
Unit tests for InventoryDimension.
Use this class for testing individual functions and methods.
"""
pass
class TestInventoryDimension(IntegrationTestCase):
def setUp(self):
prepare_test_data()

View File

@@ -7,7 +7,7 @@ import json
import frappe
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
from frappe.test_runner import make_test_objects
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, today
from erpnext.controllers.item_variant import (
@@ -74,15 +74,6 @@ def make_item(item_code=None, properties=None, uoms=None, barcode=None):
return item
class UnitTestItem(UnitTestCase):
"""
Unit tests for Item.
Use this class for testing individual functions and methods.
"""
pass
class TestItem(IntegrationTestCase):
def setUp(self):
super().setUp()

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import flt
from erpnext.controllers.subcontracting_controller import make_rm_stock_entry
@@ -26,15 +26,6 @@ from erpnext.subcontracting.doctype.subcontracting_order.subcontracting_order im
)
class UnitTestItemAlternative(UnitTestCase):
"""
Unit tests for ItemAlternative.
Use this class for testing individual functions and methods.
"""
pass
class TestItemAlternative(IntegrationTestCase):
def setUp(self):
super().setUp()

View File

@@ -3,20 +3,11 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.stock.doctype.item_attribute.item_attribute import ItemAttributeIncrementError
class UnitTestItemAttribute(UnitTestCase):
"""
Unit tests for ItemAttribute.
Use this class for testing individual functions and methods.
"""
pass
class TestItemAttribute(IntegrationTestCase):
def setUp(self):
super().setUp()

View File

@@ -3,22 +3,13 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.tests.utils import make_test_records_for_doctype
from erpnext.stock.doctype.item_price.item_price import ItemPriceDuplicateItem
from erpnext.stock.get_item_details import ItemDetailsCtx, get_price_list_rate_for
class UnitTestItemPrice(UnitTestCase):
"""
Unit tests for ItemPrice.
Use this class for testing individual functions and methods.
"""
pass
class TestItemPrice(IntegrationTestCase):
def setUp(self):
super().setUp()

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, add_to_date, flt, now, nowtime, today
from erpnext.accounts.doctype.account.test_account import create_account, get_inventory_account
@@ -20,16 +20,6 @@ from erpnext.stock.doctype.serial_and_batch_bundle.test_serial_and_batch_bundle
)
from erpnext.stock.serial_batch_bundle import SerialNoValuation
class UnitTestLandedCostVoucher(UnitTestCase):
"""
Unit tests for LandedCostVoucher.
Use this class for testing individual functions and methods.
"""
pass
EXTRA_TEST_RECORD_DEPENDENCIES = ["Currency Exchange"]

View File

@@ -7,7 +7,7 @@
import frappe
import frappe.model
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import flt, today
from erpnext.controllers.accounts_controller import InvalidQtyError
@@ -22,15 +22,6 @@ from erpnext.stock.doctype.material_request.material_request import (
from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse
class UnitTestMaterialRequest(UnitTestCase):
"""
Unit tests for MaterialRequest.
Use this class for testing individual functions and methods.
"""
pass
class TestMaterialRequest(IntegrationTestCase):
def test_material_request_qty(self):
mr = frappe.copy_doc(self.globalTestRecords["Material Request"][0])

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_to_date, nowdate
from erpnext.selling.doctype.sales_order.sales_order import make_delivery_note
@@ -40,15 +40,6 @@ def create_product_bundle(
return bundle, components
class UnitTestPackedItem(UnitTestCase):
"""
Unit tests for PackedItem.
Use this class for testing individual functions and methods.
"""
pass
class TestPackedItem(IntegrationTestCase):
"Test impact on Packed Items table in various scenarios."

View File

@@ -3,7 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.selling.doctype.product_bundle.test_product_bundle import make_product_bundle
from erpnext.stock.doctype.delivery_note.delivery_note import make_packing_slip
@@ -11,15 +11,6 @@ from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delive
from erpnext.stock.doctype.item.test_item import make_item
class UnitTestPackingSlip(UnitTestCase):
"""
Unit tests for PackingSlip.
Use this class for testing individual functions and methods.
"""
pass
class TestPackingSlip(IntegrationTestCase):
def test_packing_slip(self):
# Step - 1: Create a Product Bundle

View File

@@ -3,7 +3,7 @@
import frappe
from frappe import _dict
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.selling.doctype.sales_order.sales_order import create_pick_list
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
@@ -24,15 +24,6 @@ from erpnext.stock.doctype.stock_reconciliation.stock_reconciliation import (
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item", "Sales Invoice", "Stock Entry", "Batch"]
class UnitTestPickList(UnitTestCase):
"""
Unit tests for PickList.
Use this class for testing individual functions and methods.
"""
pass
class TestPickList(IntegrationTestCase):
def test_pick_list_picks_warehouse_for_each_item(self):
item_code = make_item().name

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, cint, cstr, flt, get_datetime, getdate, nowtime, today
from pypika import functions as fn
@@ -28,15 +28,6 @@ from erpnext.stock.doctype.serial_and_batch_bundle.test_serial_and_batch_bundle
from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse
class UnitTestPurchaseReceipt(UnitTestCase):
"""
Unit tests for PurchaseReceipt.
Use this class for testing individual functions and methods.
"""
pass
class TestPurchaseReceipt(IntegrationTestCase):
def setUp(self):
frappe.db.set_single_value("Buying Settings", "allow_multiple_items", 1)

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.stock.doctype.batch.test_batch import make_new_batch
from erpnext.stock.doctype.item.test_item import make_item
@@ -16,15 +16,6 @@ from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse
from erpnext.stock.get_item_details import get_conversion_factor
class UnitTestPutawayRule(UnitTestCase):
"""
Unit tests for PutawayRule.
Use this class for testing individual functions and methods.
"""
pass
class TestPutawayRule(IntegrationTestCase):
def setUp(self):
if not frappe.db.exists("Item", "_Rice"):

View File

@@ -2,7 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import nowdate
from erpnext.controllers.stock_controller import (
@@ -16,15 +16,6 @@ from erpnext.stock.doctype.item.test_item import create_item
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
class UnitTestQualityInspection(UnitTestCase):
"""
Unit tests for QualityInspection.
Use this class for testing individual functions and methods.
"""
pass
class TestQualityInspection(IntegrationTestCase):
def setUp(self):
super().setUp()

View File

@@ -4,7 +4,7 @@
import json
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import flt, nowtime, today
from erpnext.stock.doctype.item.test_item import make_item
@@ -16,15 +16,6 @@ from erpnext.stock.doctype.serial_and_batch_bundle.serial_and_batch_bundle impor
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
class UnitTestSerialAndBatchBundle(UnitTestCase):
"""
Unit tests for SerialAndBatchBundle.
Use this class for testing individual functions and methods.
"""
pass
class TestSerialandBatchBundle(IntegrationTestCase):
def test_naming_for_sabb(self):
frappe.db.set_single_value(

View File

@@ -7,7 +7,7 @@
import frappe
from frappe import _dict
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delivery_note
from erpnext.stock.doctype.item.test_item import make_item
@@ -24,15 +24,6 @@ from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item"]
class UnitTestSerialNo(UnitTestCase):
"""
Unit tests for SerialNo.
Use this class for testing individual functions and methods.
"""
pass
class TestSerialNo(IntegrationTestCase):
def tearDown(self):
frappe.db.rollback()

View File

@@ -4,20 +4,11 @@
from datetime import date, timedelta
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from erpnext.stock.doctype.delivery_note.delivery_note import make_shipment
class UnitTestShipment(UnitTestCase):
"""
Unit tests for Shipment.
Use this class for testing individual functions and methods.
"""
pass
class TestShipment(IntegrationTestCase):
def test_shipment_from_delivery_note(self):
delivery_note = create_test_delivery_note()

View File

@@ -2,7 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
# On IntegrationTestCase, the doctype test records and all
# link-field test record depdendencies are recursively loaded
@@ -11,15 +11,6 @@ EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
class UnitTestStockClosingBalance(UnitTestCase):
"""
Unit tests for StockClosingBalance.
Use this class for testing individual functions and methods.
"""
pass
class IntegrationTestStockClosingBalance(IntegrationTestCase):
"""
Integration tests for StockClosingBalance.

View File

@@ -2,7 +2,7 @@
# See license.txt
# import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
# On IntegrationTestCase, the doctype test records and all
# link-field test record depdendencies are recursively loaded
@@ -11,15 +11,6 @@ EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
class UnitTestStockClosingEntry(UnitTestCase):
"""
Unit tests for StockClosingEntry.
Use this class for testing individual functions and methods.
"""
pass
class IntegrationTestStockClosingEntry(IntegrationTestCase):
"""
Integration tests for StockClosingEntry.

View File

@@ -3,7 +3,7 @@
from frappe.permissions import add_user_permission, remove_user_permission
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, cstr, flt, get_time, getdate, nowtime, today
from erpnext.accounts.doctype.account.test_account import get_inventory_account
@@ -49,15 +49,6 @@ def get_sle(**args):
)
class UnitTestStockEntry(UnitTestCase):
"""
Unit tests for StockEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestStockEntry(IntegrationTestCase):
def tearDown(self):
frappe.db.rollback()

View File

@@ -8,7 +8,7 @@ from uuid import uuid4
import frappe
from frappe.core.page.permission_manager.permission_manager import reset
from frappe.custom.doctype.property_setter.property_setter import make_property_setter
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, add_to_date, flt, today
from erpnext.accounts.doctype.gl_entry.gl_entry import rename_gle_sle_docs
@@ -1590,15 +1590,6 @@ def get_unique_suffix():
return str(uuid4())[:8].upper()
class UnitTestStockLedgerEntry(UnitTestCase):
"""
Unit tests for StockLedgerEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestDeferredNaming(IntegrationTestCase):
@classmethod
def setUpClass(cls) -> None:

View File

@@ -4,7 +4,7 @@
from random import randint
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import today
from erpnext.selling.doctype.sales_order.sales_order import create_pick_list, make_delivery_note
@@ -21,15 +21,6 @@ from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry impor
from erpnext.stock.utils import get_stock_balance
class UnitTestStockReservationEntry(UnitTestCase):
"""
Unit tests for StockReservationEntry.
Use this class for testing individual functions and methods.
"""
pass
class TestStockReservationEntry(IntegrationTestCase):
def setUp(self) -> None:
self.warehouse = "_Test Warehouse - _TC"

View File

@@ -3,16 +3,7 @@
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestStockSettings(UnitTestCase):
"""
Unit tests for StockSettings.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestStockSettings(IntegrationTestCase):

View File

@@ -2,7 +2,7 @@
# License: GNU General Public License v3. See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
import erpnext
from erpnext.accounts.doctype.account.test_account import create_account
@@ -11,15 +11,6 @@ from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
from erpnext.stock.doctype.warehouse.warehouse import convert_to_group_or_ledger, get_children
class UnitTestWarehouse(UnitTestCase):
"""
Unit tests for Warehouse.
Use this class for testing individual functions and methods.
"""
pass
class TestWarehouse(IntegrationTestCase):
def test_parent_warehouse(self):
parent_warehouse = frappe.get_doc("Warehouse", "_Test Warehouse Group - _TC")

View File

@@ -2,16 +2,7 @@
# See license.txt
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
class UnitTestSubcontractingBom(UnitTestCase):
"""
Unit tests for SubcontractingBom.
Use this class for testing individual functions and methods.
"""
pass
from frappe.tests import IntegrationTestCase
class TestSubcontractingBOM(IntegrationTestCase):

View File

@@ -5,7 +5,7 @@ import copy
from collections import defaultdict
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import flt
from erpnext.buying.doctype.purchase_order.purchase_order import get_mapped_subcontracting_order
@@ -33,15 +33,6 @@ from erpnext.subcontracting.doctype.subcontracting_order.subcontracting_order im
)
class UnitTestSubcontractingOrder(UnitTestCase):
"""
Unit tests for SubcontractingOrder.
Use this class for testing individual functions and methods.
"""
pass
class TestSubcontractingOrder(IntegrationTestCase):
def setUp(self):
make_subcontracted_items()

View File

@@ -5,7 +5,7 @@
import copy
import frappe
from frappe.tests import IntegrationTestCase, UnitTestCase
from frappe.tests import IntegrationTestCase
from frappe.utils import add_days, cint, flt, nowtime, today
import erpnext
@@ -40,15 +40,6 @@ from erpnext.subcontracting.doctype.subcontracting_order.subcontracting_order im
)
class UnitTestSubcontractingReceipt(UnitTestCase):
"""
Unit tests for SubcontractingReceipt.
Use this class for testing individual functions and methods.
"""
pass
class TestSubcontractingReceipt(IntegrationTestCase):
def setUp(self):
make_subcontracted_items()