From c222d5fa55a2a92ba97a1516d55b8e261dfcaa05 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 10 Jun 2025 10:54:04 +0530 Subject: [PATCH] chore: Drop empty UnitTestCase --- .../test_account_closing_balance.py | 11 +---------- .../test_advance_payment_ledger_entry.py | 2 +- .../bank_transaction/test_auto_match_party.py | 11 +---------- .../bank_transaction/test_bank_transaction.py | 11 +---------- .../test_bisect_accounting_statements.py | 11 +---------- .../doctype/bisect_nodes/test_bisect_nodes.py | 11 +---------- erpnext/accounts/doctype/dunning/test_dunning.py | 11 +---------- .../doctype/journal_entry/test_journal_entry.py | 11 +---------- .../test_ledger_health_monitor.py | 11 +---------- .../test_opening_invoice_creation_tool.py | 11 +---------- .../doctype/payment_entry/test_payment_entry.py | 11 +---------- .../test_payment_ledger_entry.py | 11 +---------- .../doctype/payment_order/test_payment_order.py | 11 +---------- .../test_payment_reconciliation.py | 11 +---------- .../doctype/payment_request/test_payment_request.py | 11 +---------- .../test_pos_invoice_merge_log.py | 11 +---------- .../doctype/pricing_rule/test_pricing_rule.py | 11 +---------- .../test_process_payment_reconciliation.py | 11 +---------- .../test_process_payment_reconciliation_log.py | 11 +---------- .../test_process_subscription.py | 11 +---------- .../test_repost_accounting_ledger_settings.py | 11 +---------- .../test_repost_payment_ledger.py | 11 +---------- .../doctype/sales_invoice/test_sales_invoice.py | 11 +---------- .../doctype/subscription/test_subscription.py | 11 +---------- .../test_tax_withholding_category.py | 11 +---------- .../doctype/asset_activity/test_asset_activity.py | 11 +---------- .../test_asset_depreciation_schedule.py | 11 +---------- .../test_asset_shift_allocation.py | 11 +---------- .../asset_shift_factor/test_asset_shift_factor.py | 11 +---------- .../test_bulk_transaction_log.py | 11 +---------- .../test_bulk_transaction_log_detail.py | 11 +---------- .../doctype/purchase_order/test_purchase_order.py | 11 +---------- .../test_request_for_quotation.py | 11 +---------- erpnext/buying/doctype/supplier/test_supplier.py | 11 +---------- .../supplier_quotation/test_supplier_quotation.py | 11 +---------- .../supplier_scorecard/test_supplier_scorecard.py | 11 +---------- .../test_supplier_scorecard_criteria.py | 11 +---------- .../test_supplier_scorecard_variable.py | 11 +---------- .../doctype/blanket_order/test_blanket_order.py | 11 +---------- erpnext/manufacturing/doctype/bom/test_bom.py | 11 +---------- .../doctype/bom_creator/test_bom_creator.py | 11 +---------- .../doctype/bom_update_log/test_bom_update_log.py | 12 +----------- .../doctype/bom_update_tool/test_bom_update_tool.py | 12 +----------- .../manufacturing/doctype/job_card/test_job_card.py | 11 +---------- .../doctype/plant_floor/test_plant_floor.py | 11 +---------- .../doctype/production_plan/test_production_plan.py | 11 +---------- .../manufacturing/doctype/routing/test_routing.py | 11 +---------- .../doctype/work_order/test_work_order.py | 11 +---------- .../doctype/workstation/test_workstation.py | 11 +---------- .../workstation_type/test_workstation_type.py | 11 +---------- erpnext/projects/doctype/project/test_project.py | 11 +---------- .../quality_procedure/test_quality_procedure.py | 11 +---------- erpnext/selling/doctype/customer/test_customer.py | 11 +---------- .../party_specific_item/test_party_specific_item.py | 11 +---------- erpnext/selling/doctype/quotation/test_quotation.py | 11 +---------- erpnext/setup/doctype/incoterm/test_incoterm.py | 11 +---------- .../test_transaction_deletion_record.py | 11 +---------- erpnext/stock/doctype/batch/test_batch.py | 11 +---------- erpnext/stock/doctype/bin/test_bin.py | 11 +---------- .../doctype/delivery_note/test_delivery_note.py | 11 +---------- .../doctype/delivery_trip/test_delivery_trip.py | 11 +---------- .../inventory_dimension/test_inventory_dimension.py | 11 +---------- erpnext/stock/doctype/item/test_item.py | 11 +---------- .../item_alternative/test_item_alternative.py | 11 +---------- .../doctype/item_attribute/test_item_attribute.py | 11 +---------- erpnext/stock/doctype/item_price/test_item_price.py | 11 +---------- .../landed_cost_voucher/test_landed_cost_voucher.py | 12 +----------- .../material_request/test_material_request.py | 11 +---------- .../stock/doctype/packed_item/test_packed_item.py | 11 +---------- .../stock/doctype/packing_slip/test_packing_slip.py | 11 +---------- erpnext/stock/doctype/pick_list/test_pick_list.py | 11 +---------- .../purchase_receipt/test_purchase_receipt.py | 11 +---------- .../stock/doctype/putaway_rule/test_putaway_rule.py | 11 +---------- .../quality_inspection/test_quality_inspection.py | 11 +---------- .../test_serial_and_batch_bundle.py | 11 +---------- erpnext/stock/doctype/serial_no/test_serial_no.py | 11 +---------- erpnext/stock/doctype/shipment/test_shipment.py | 11 +---------- .../test_stock_closing_balance.py | 11 +---------- .../stock_closing_entry/test_stock_closing_entry.py | 11 +---------- .../stock/doctype/stock_entry/test_stock_entry.py | 11 +---------- .../stock_ledger_entry/test_stock_ledger_entry.py | 11 +---------- .../test_stock_reservation_entry.py | 11 +---------- .../doctype/stock_settings/test_stock_settings.py | 11 +---------- erpnext/stock/doctype/warehouse/test_warehouse.py | 11 +---------- .../subcontracting_bom/test_subcontracting_bom.py | 11 +---------- .../test_subcontracting_order.py | 11 +---------- .../test_subcontracting_receipt.py | 11 +---------- 87 files changed, 87 insertions(+), 864 deletions(-) diff --git a/erpnext/accounts/doctype/account_closing_balance/test_account_closing_balance.py b/erpnext/accounts/doctype/account_closing_balance/test_account_closing_balance.py index c24fb115d0a..53f4e5d15af 100644 --- a/erpnext/accounts/doctype/account_closing_balance/test_account_closing_balance.py +++ b/erpnext/accounts/doctype/account_closing_balance/test_account_closing_balance.py @@ -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): diff --git a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py index f9ac59bfa80..f824e6893e4 100644 --- a/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py +++ b/erpnext/accounts/doctype/advance_payment_ledger_entry/test_advance_payment_ledger_entry.py @@ -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 diff --git a/erpnext/accounts/doctype/bank_transaction/test_auto_match_party.py b/erpnext/accounts/doctype/bank_transaction/test_auto_match_party.py index db87a72aba4..f49b443065b 100644 --- a/erpnext/accounts/doctype/bank_transaction/test_auto_match_party.py +++ b/erpnext/accounts/doctype/bank_transaction/test_auto_match_party.py @@ -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): diff --git a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py index d0329631f8e..e04c67e54d4 100644 --- a/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py +++ b/erpnext/accounts/doctype/bank_transaction/test_bank_transaction.py @@ -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() diff --git a/erpnext/accounts/doctype/bisect_accounting_statements/test_bisect_accounting_statements.py b/erpnext/accounts/doctype/bisect_accounting_statements/test_bisect_accounting_statements.py index 6c680c80183..fd1793b2560 100644 --- a/erpnext/accounts/doctype/bisect_accounting_statements/test_bisect_accounting_statements.py +++ b/erpnext/accounts/doctype/bisect_accounting_statements/test_bisect_accounting_statements.py @@ -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): diff --git a/erpnext/accounts/doctype/bisect_nodes/test_bisect_nodes.py b/erpnext/accounts/doctype/bisect_nodes/test_bisect_nodes.py index e56c0769c71..1f37009d8e2 100644 --- a/erpnext/accounts/doctype/bisect_nodes/test_bisect_nodes.py +++ b/erpnext/accounts/doctype/bisect_nodes/test_bisect_nodes.py @@ -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): diff --git a/erpnext/accounts/doctype/dunning/test_dunning.py b/erpnext/accounts/doctype/dunning/test_dunning.py index 2340d66f499..9c0885a5bd0 100644 --- a/erpnext/accounts/doctype/dunning/test_dunning.py +++ b/erpnext/accounts/doctype/dunning/test_dunning.py @@ -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): diff --git a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py index 51718436a5a..c5d7f2920fd 100644 --- a/erpnext/accounts/doctype/journal_entry/test_journal_entry.py +++ b/erpnext/accounts/doctype/journal_entry/test_journal_entry.py @@ -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} diff --git a/erpnext/accounts/doctype/ledger_health_monitor/test_ledger_health_monitor.py b/erpnext/accounts/doctype/ledger_health_monitor/test_ledger_health_monitor.py index a5aacde416e..bc2193f10ce 100644 --- a/erpnext/accounts/doctype/ledger_health_monitor/test_ledger_health_monitor.py +++ b/erpnext/accounts/doctype/ledger_health_monitor/test_ledger_health_monitor.py @@ -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): diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/test_opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/test_opening_invoice_creation_tool.py index decff33aeb1..730d5db8ae6 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/test_opening_invoice_creation_tool.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/test_opening_invoice_creation_tool.py @@ -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): diff --git a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py index 99ebcc695bc..ff653ec8971 100644 --- a/erpnext/accounts/doctype/payment_entry/test_payment_entry.py +++ b/erpnext/accounts/doctype/payment_entry/test_payment_entry.py @@ -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() diff --git a/erpnext/accounts/doctype/payment_ledger_entry/test_payment_ledger_entry.py b/erpnext/accounts/doctype/payment_ledger_entry/test_payment_ledger_entry.py index 13598735aef..1de103764a4 100644 --- a/erpnext/accounts/doctype/payment_ledger_entry/test_payment_ledger_entry.py +++ b/erpnext/accounts/doctype/payment_ledger_entry/test_payment_ledger_entry.py @@ -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") diff --git a/erpnext/accounts/doctype/payment_order/test_payment_order.py b/erpnext/accounts/doctype/payment_order/test_payment_order.py index e98531bc54d..a261bc6b0b8 100644 --- a/erpnext/accounts/doctype/payment_order/test_payment_order.py +++ b/erpnext/accounts/doctype/payment_order/test_payment_order.py @@ -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 diff --git a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py index 438ec08bea5..da1a47bc3db 100644 --- a/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py +++ b/erpnext/accounts/doctype/payment_reconciliation/test_payment_reconciliation.py @@ -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() diff --git a/erpnext/accounts/doctype/payment_request/test_payment_request.py b/erpnext/accounts/doctype/payment_request/test_payment_request.py index b17875dd1e1..c57e047b96b 100644 --- a/erpnext/accounts/doctype/payment_request/test_payment_request.py +++ b/erpnext/accounts/doctype/payment_request/test_payment_request.py @@ -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: diff --git a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py index 7b1b2af3382..9343ffb1f71 100644 --- a/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py +++ b/erpnext/accounts/doctype/pos_invoice_merge_log/test_pos_invoice_merge_log.py @@ -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): diff --git a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py index d61b123c67b..caf8ac78e80 100644 --- a/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py @@ -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() diff --git a/erpnext/accounts/doctype/process_payment_reconciliation/test_process_payment_reconciliation.py b/erpnext/accounts/doctype/process_payment_reconciliation/test_process_payment_reconciliation.py index 68a87960802..d54ff6f902e 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation/test_process_payment_reconciliation.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation/test_process_payment_reconciliation.py @@ -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): diff --git a/erpnext/accounts/doctype/process_payment_reconciliation_log/test_process_payment_reconciliation_log.py b/erpnext/accounts/doctype/process_payment_reconciliation_log/test_process_payment_reconciliation_log.py index 6705820e8b3..66a4dca21e1 100644 --- a/erpnext/accounts/doctype/process_payment_reconciliation_log/test_process_payment_reconciliation_log.py +++ b/erpnext/accounts/doctype/process_payment_reconciliation_log/test_process_payment_reconciliation_log.py @@ -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): diff --git a/erpnext/accounts/doctype/process_subscription/test_process_subscription.py b/erpnext/accounts/doctype/process_subscription/test_process_subscription.py index ad52f72cf0f..5ec80641192 100644 --- a/erpnext/accounts/doctype/process_subscription/test_process_subscription.py +++ b/erpnext/accounts/doctype/process_subscription/test_process_subscription.py @@ -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): diff --git a/erpnext/accounts/doctype/repost_accounting_ledger_settings/test_repost_accounting_ledger_settings.py b/erpnext/accounts/doctype/repost_accounting_ledger_settings/test_repost_accounting_ledger_settings.py index dac5835d728..2dd4c50ba7e 100644 --- a/erpnext/accounts/doctype/repost_accounting_ledger_settings/test_repost_accounting_ledger_settings.py +++ b/erpnext/accounts/doctype/repost_accounting_ledger_settings/test_repost_accounting_ledger_settings.py @@ -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): diff --git a/erpnext/accounts/doctype/repost_payment_ledger/test_repost_payment_ledger.py b/erpnext/accounts/doctype/repost_payment_ledger/test_repost_payment_ledger.py index ef169f28eff..a09ba71e27c 100644 --- a/erpnext/accounts/doctype/repost_payment_ledger/test_repost_payment_ledger.py +++ b/erpnext/accounts/doctype/repost_payment_ledger/test_repost_payment_ledger.py @@ -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): diff --git a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py index 08a4a51dfcb..8216de391de 100644 --- a/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/test_sales_invoice.py @@ -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 diff --git a/erpnext/accounts/doctype/subscription/test_subscription.py b/erpnext/accounts/doctype/subscription/test_subscription.py index 041d770b3b3..ce2c7193597 100644 --- a/erpnext/accounts/doctype/subscription/test_subscription.py +++ b/erpnext/accounts/doctype/subscription/test_subscription.py @@ -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() diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 79939600b3f..b2b05045c3e 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -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): diff --git a/erpnext/assets/doctype/asset_activity/test_asset_activity.py b/erpnext/assets/doctype/asset_activity/test_asset_activity.py index 01d02d43f1c..1c7d472c88b 100644 --- a/erpnext/assets/doctype/asset_activity/test_asset_activity.py +++ b/erpnext/assets/doctype/asset_activity/test_asset_activity.py @@ -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): diff --git a/erpnext/assets/doctype/asset_depreciation_schedule/test_asset_depreciation_schedule.py b/erpnext/assets/doctype/asset_depreciation_schedule/test_asset_depreciation_schedule.py index e36042bd6e7..7e226a8fe90 100644 --- a/erpnext/assets/doctype/asset_depreciation_schedule/test_asset_depreciation_schedule.py +++ b/erpnext/assets/doctype/asset_depreciation_schedule/test_asset_depreciation_schedule.py @@ -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() diff --git a/erpnext/assets/doctype/asset_shift_allocation/test_asset_shift_allocation.py b/erpnext/assets/doctype/asset_shift_allocation/test_asset_shift_allocation.py index 4295901568b..ede39c88974 100644 --- a/erpnext/assets/doctype/asset_shift_allocation/test_asset_shift_allocation.py +++ b/erpnext/assets/doctype/asset_shift_allocation/test_asset_shift_allocation.py @@ -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): diff --git a/erpnext/assets/doctype/asset_shift_factor/test_asset_shift_factor.py b/erpnext/assets/doctype/asset_shift_factor/test_asset_shift_factor.py index 9416d325cc2..12d68b02c5f 100644 --- a/erpnext/assets/doctype/asset_shift_factor/test_asset_shift_factor.py +++ b/erpnext/assets/doctype/asset_shift_factor/test_asset_shift_factor.py @@ -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): diff --git a/erpnext/bulk_transaction/doctype/bulk_transaction_log/test_bulk_transaction_log.py b/erpnext/bulk_transaction/doctype/bulk_transaction_log/test_bulk_transaction_log.py index 4cd27de01e7..66e6456d103 100644 --- a/erpnext/bulk_transaction/doctype/bulk_transaction_log/test_bulk_transaction_log.py +++ b/erpnext/bulk_transaction/doctype/bulk_transaction_log/test_bulk_transaction_log.py @@ -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): diff --git a/erpnext/bulk_transaction/doctype/bulk_transaction_log_detail/test_bulk_transaction_log_detail.py b/erpnext/bulk_transaction/doctype/bulk_transaction_log_detail/test_bulk_transaction_log_detail.py index ecfdbdba49b..6b9b4637ab4 100644 --- a/erpnext/bulk_transaction/doctype/bulk_transaction_log_detail/test_bulk_transaction_log_detail.py +++ b/erpnext/bulk_transaction/doctype/bulk_transaction_log_detail/test_bulk_transaction_log_detail.py @@ -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): diff --git a/erpnext/buying/doctype/purchase_order/test_purchase_order.py b/erpnext/buying/doctype/purchase_order/test_purchase_order.py index 9f7f5332213..83622ed22a6 100644 --- a/erpnext/buying/doctype/purchase_order/test_purchase_order.py +++ b/erpnext/buying/doctype/purchase_order/test_purchase_order.py @@ -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) diff --git a/erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py b/erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py index 7d77b6a32ab..d9695f47461 100644 --- a/erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py +++ b/erpnext/buying/doctype/request_for_quotation/test_request_for_quotation.py @@ -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) diff --git a/erpnext/buying/doctype/supplier/test_supplier.py b/erpnext/buying/doctype/supplier/test_supplier.py index d409541075f..ec504059396 100644 --- a/erpnext/buying/doctype/supplier/test_supplier.py +++ b/erpnext/buying/doctype/supplier/test_supplier.py @@ -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): diff --git a/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py b/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py index ad0a18c26f5..b0e5c29fdb9 100644 --- a/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py +++ b/erpnext/buying/doctype/supplier_quotation/test_supplier_quotation.py @@ -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]) diff --git a/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py b/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py index de7e8bd7b12..c65ebe2086f 100644 --- a/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py +++ b/erpnext/buying/doctype/supplier_scorecard/test_supplier_scorecard.py @@ -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): diff --git a/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py b/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py index 516d0e38222..7b98d6d23c0 100644 --- a/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py +++ b/erpnext/buying/doctype/supplier_scorecard_criteria/test_supplier_scorecard_criteria.py @@ -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): diff --git a/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py b/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py index cbf06e074c1..8f4b2f4ecdf 100644 --- a/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py +++ b/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py @@ -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: diff --git a/erpnext/manufacturing/doctype/blanket_order/test_blanket_order.py b/erpnext/manufacturing/doctype/blanket_order/test_blanket_order.py index 148e38fd50d..169197e04ca 100644 --- a/erpnext/manufacturing/doctype/blanket_order/test_blanket_order.py +++ b/erpnext/manufacturing/doctype/blanket_order/test_blanket_order.py @@ -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() diff --git a/erpnext/manufacturing/doctype/bom/test_bom.py b/erpnext/manufacturing/doctype/bom/test_bom.py index 1f36e773c85..a185b2d0962 100644 --- a/erpnext/manufacturing/doctype/bom/test_bom.py +++ b/erpnext/manufacturing/doctype/bom/test_bom.py @@ -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): diff --git a/erpnext/manufacturing/doctype/bom_creator/test_bom_creator.py b/erpnext/manufacturing/doctype/bom_creator/test_bom_creator.py index 79b9e669ae3..cfcd288e098 100644 --- a/erpnext/manufacturing/doctype/bom_creator/test_bom_creator.py +++ b/erpnext/manufacturing/doctype/bom_creator/test_bom_creator.py @@ -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() diff --git a/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py b/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py index 4db8697d82d..815d5599ef0 100644 --- a/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py +++ b/erpnext/manufacturing/doctype/bom_update_log/test_bom_update_log.py @@ -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"] diff --git a/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py b/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py index 2aa9019fce1..05bf252bedf 100644 --- a/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py +++ b/erpnext/manufacturing/doctype/bom_update_tool/test_bom_update_tool.py @@ -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"] diff --git a/erpnext/manufacturing/doctype/job_card/test_job_card.py b/erpnext/manufacturing/doctype/job_card/test_job_card.py index 9e34d9e65ec..4ab07321bd2 100644 --- a/erpnext/manufacturing/doctype/job_card/test_job_card.py +++ b/erpnext/manufacturing/doctype/job_card/test_job_card.py @@ -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): diff --git a/erpnext/manufacturing/doctype/plant_floor/test_plant_floor.py b/erpnext/manufacturing/doctype/plant_floor/test_plant_floor.py index cbc231754f9..78a8662e1fc 100644 --- a/erpnext/manufacturing/doctype/plant_floor/test_plant_floor.py +++ b/erpnext/manufacturing/doctype/plant_floor/test_plant_floor.py @@ -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): diff --git a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py index 2010161170b..1bc74cbb1a8 100644 --- a/erpnext/manufacturing/doctype/production_plan/test_production_plan.py +++ b/erpnext/manufacturing/doctype/production_plan/test_production_plan.py @@ -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 [ diff --git a/erpnext/manufacturing/doctype/routing/test_routing.py b/erpnext/manufacturing/doctype/routing/test_routing.py index 12799ef9fe2..27dcade6195 100644 --- a/erpnext/manufacturing/doctype/routing/test_routing.py +++ b/erpnext/manufacturing/doctype/routing/test_routing.py @@ -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): diff --git a/erpnext/manufacturing/doctype/work_order/test_work_order.py b/erpnext/manufacturing/doctype/work_order/test_work_order.py index 2ea2c1ea9ac..ea12542402c 100644 --- a/erpnext/manufacturing/doctype/work_order/test_work_order.py +++ b/erpnext/manufacturing/doctype/work_order/test_work_order.py @@ -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" diff --git a/erpnext/manufacturing/doctype/workstation/test_workstation.py b/erpnext/manufacturing/doctype/workstation/test_workstation.py index ad2cea8ac32..51c31f029b3 100644 --- a/erpnext/manufacturing/doctype/workstation/test_workstation.py +++ b/erpnext/manufacturing/doctype/workstation/test_workstation.py @@ -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( diff --git a/erpnext/manufacturing/doctype/workstation_type/test_workstation_type.py b/erpnext/manufacturing/doctype/workstation_type/test_workstation_type.py index e36d3f2a583..7e62d4c4ffe 100644 --- a/erpnext/manufacturing/doctype/workstation_type/test_workstation_type.py +++ b/erpnext/manufacturing/doctype/workstation_type/test_workstation_type.py @@ -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): diff --git a/erpnext/projects/doctype/project/test_project.py b/erpnext/projects/doctype/project/test_project.py index 2c88b88ff4e..e9b3076e5d3 100644 --- a/erpnext/projects/doctype/project/test_project.py +++ b/erpnext/projects/doctype/project/test_project.py @@ -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): diff --git a/erpnext/quality_management/doctype/quality_procedure/test_quality_procedure.py b/erpnext/quality_management/doctype/quality_procedure/test_quality_procedure.py index 97bca751965..64022ec4c37 100644 --- a/erpnext/quality_management/doctype/quality_procedure/test_quality_procedure.py +++ b/erpnext/quality_management/doctype/quality_procedure/test_quality_procedure.py @@ -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( diff --git a/erpnext/selling/doctype/customer/test_customer.py b/erpnext/selling/doctype/customer/test_customer.py index eb3d3f2392f..803cb808432 100644 --- a/erpnext/selling/doctype/customer/test_customer.py +++ b/erpnext/selling/doctype/customer/test_customer.py @@ -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) diff --git a/erpnext/selling/doctype/party_specific_item/test_party_specific_item.py b/erpnext/selling/doctype/party_specific_item/test_party_specific_item.py index 6b4482909e6..89426ca1f65 100644 --- a/erpnext/selling/doctype/party_specific_item/test_party_specific_item.py +++ b/erpnext/selling/doctype/party_specific_item/test_party_specific_item.py @@ -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") diff --git a/erpnext/selling/doctype/quotation/test_quotation.py b/erpnext/selling/doctype/quotation/test_quotation.py index 3a84ef4fa1c..714ef5c79cf 100644 --- a/erpnext/selling/doctype/quotation/test_quotation.py +++ b/erpnext/selling/doctype/quotation/test_quotation.py @@ -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) diff --git a/erpnext/setup/doctype/incoterm/test_incoterm.py b/erpnext/setup/doctype/incoterm/test_incoterm.py index 36ae5fd4e6a..e38854e648b 100644 --- a/erpnext/setup/doctype/incoterm/test_incoterm.py +++ b/erpnext/setup/doctype/incoterm/test_incoterm.py @@ -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): diff --git a/erpnext/setup/doctype/transaction_deletion_record/test_transaction_deletion_record.py b/erpnext/setup/doctype/transaction_deletion_record/test_transaction_deletion_record.py index 77bedaed9ea..fcfb006860c 100644 --- a/erpnext/setup/doctype/transaction_deletion_record/test_transaction_deletion_record.py +++ b/erpnext/setup/doctype/transaction_deletion_record/test_transaction_deletion_record.py @@ -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): diff --git a/erpnext/stock/doctype/batch/test_batch.py b/erpnext/stock/doctype/batch/test_batch.py index 36e484871fa..8d56ce8b1ee 100644 --- a/erpnext/stock/doctype/batch/test_batch.py +++ b/erpnext/stock/doctype/batch/test_batch.py @@ -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( diff --git a/erpnext/stock/doctype/bin/test_bin.py b/erpnext/stock/doctype/bin/test_bin.py index 66f14d84d51..7ed3089e05e 100644 --- a/erpnext/stock/doctype/bin/test_bin.py +++ b/erpnext/stock/doctype/bin/test_bin.py @@ -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""" diff --git a/erpnext/stock/doctype/delivery_note/test_delivery_note.py b/erpnext/stock/doctype/delivery_note/test_delivery_note.py index fcd5bc20e1e..ab2fc92ad96 100644 --- a/erpnext/stock/doctype/delivery_note/test_delivery_note.py +++ b/erpnext/stock/doctype/delivery_note/test_delivery_note.py @@ -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) diff --git a/erpnext/stock/doctype/delivery_trip/test_delivery_trip.py b/erpnext/stock/doctype/delivery_trip/test_delivery_trip.py index 40fe4f75df9..9966af7c99b 100644 --- a/erpnext/stock/doctype/delivery_trip/test_delivery_trip.py +++ b/erpnext/stock/doctype/delivery_trip/test_delivery_trip.py @@ -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() diff --git a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py index f0aab97933d..6bb821fb0b8 100644 --- a/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py +++ b/erpnext/stock/doctype/inventory_dimension/test_inventory_dimension.py @@ -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() diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py index d13456c249e..51b38e30fc1 100644 --- a/erpnext/stock/doctype/item/test_item.py +++ b/erpnext/stock/doctype/item/test_item.py @@ -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() diff --git a/erpnext/stock/doctype/item_alternative/test_item_alternative.py b/erpnext/stock/doctype/item_alternative/test_item_alternative.py index 442ae755a7d..d96061e0d94 100644 --- a/erpnext/stock/doctype/item_alternative/test_item_alternative.py +++ b/erpnext/stock/doctype/item_alternative/test_item_alternative.py @@ -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() diff --git a/erpnext/stock/doctype/item_attribute/test_item_attribute.py b/erpnext/stock/doctype/item_attribute/test_item_attribute.py index 96d84fe83d7..7ed800dca19 100644 --- a/erpnext/stock/doctype/item_attribute/test_item_attribute.py +++ b/erpnext/stock/doctype/item_attribute/test_item_attribute.py @@ -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() diff --git a/erpnext/stock/doctype/item_price/test_item_price.py b/erpnext/stock/doctype/item_price/test_item_price.py index ffe335bead9..42726054c1b 100644 --- a/erpnext/stock/doctype/item_price/test_item_price.py +++ b/erpnext/stock/doctype/item_price/test_item_price.py @@ -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() diff --git a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py index 908bee7b1ff..8b6268e1b6e 100644 --- a/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py +++ b/erpnext/stock/doctype/landed_cost_voucher/test_landed_cost_voucher.py @@ -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"] diff --git a/erpnext/stock/doctype/material_request/test_material_request.py b/erpnext/stock/doctype/material_request/test_material_request.py index 331e7f8eb23..5f5c2b657b6 100644 --- a/erpnext/stock/doctype/material_request/test_material_request.py +++ b/erpnext/stock/doctype/material_request/test_material_request.py @@ -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]) diff --git a/erpnext/stock/doctype/packed_item/test_packed_item.py b/erpnext/stock/doctype/packed_item/test_packed_item.py index 6c710453a98..5ace12184a7 100644 --- a/erpnext/stock/doctype/packed_item/test_packed_item.py +++ b/erpnext/stock/doctype/packed_item/test_packed_item.py @@ -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." diff --git a/erpnext/stock/doctype/packing_slip/test_packing_slip.py b/erpnext/stock/doctype/packing_slip/test_packing_slip.py index dbd9892c4c3..8d16b2d8fe0 100644 --- a/erpnext/stock/doctype/packing_slip/test_packing_slip.py +++ b/erpnext/stock/doctype/packing_slip/test_packing_slip.py @@ -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 diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py index fad31e5f91a..910f9c3b400 100644 --- a/erpnext/stock/doctype/pick_list/test_pick_list.py +++ b/erpnext/stock/doctype/pick_list/test_pick_list.py @@ -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 diff --git a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py index 42f53a6abc8..52e114d64a2 100644 --- a/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py +++ b/erpnext/stock/doctype/purchase_receipt/test_purchase_receipt.py @@ -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) diff --git a/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py b/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py index bfdf3715fc9..df285665a38 100644 --- a/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py +++ b/erpnext/stock/doctype/putaway_rule/test_putaway_rule.py @@ -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"): diff --git a/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py b/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py index 80c18a9226f..15167286b9b 100644 --- a/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py +++ b/erpnext/stock/doctype/quality_inspection/test_quality_inspection.py @@ -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() diff --git a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py index ba1740d4b38..8487945788e 100644 --- a/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py +++ b/erpnext/stock/doctype/serial_and_batch_bundle/test_serial_and_batch_bundle.py @@ -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( diff --git a/erpnext/stock/doctype/serial_no/test_serial_no.py b/erpnext/stock/doctype/serial_no/test_serial_no.py index fbb5ee9a071..c1300ee531b 100644 --- a/erpnext/stock/doctype/serial_no/test_serial_no.py +++ b/erpnext/stock/doctype/serial_no/test_serial_no.py @@ -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() diff --git a/erpnext/stock/doctype/shipment/test_shipment.py b/erpnext/stock/doctype/shipment/test_shipment.py index 57ac126c222..4a26107524e 100644 --- a/erpnext/stock/doctype/shipment/test_shipment.py +++ b/erpnext/stock/doctype/shipment/test_shipment.py @@ -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() diff --git a/erpnext/stock/doctype/stock_closing_balance/test_stock_closing_balance.py b/erpnext/stock/doctype/stock_closing_balance/test_stock_closing_balance.py index 11644326ecf..8e09d518f3f 100644 --- a/erpnext/stock/doctype/stock_closing_balance/test_stock_closing_balance.py +++ b/erpnext/stock/doctype/stock_closing_balance/test_stock_closing_balance.py @@ -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. diff --git a/erpnext/stock/doctype/stock_closing_entry/test_stock_closing_entry.py b/erpnext/stock/doctype/stock_closing_entry/test_stock_closing_entry.py index 50216b52070..2a2f0eb86b7 100644 --- a/erpnext/stock/doctype/stock_closing_entry/test_stock_closing_entry.py +++ b/erpnext/stock/doctype/stock_closing_entry/test_stock_closing_entry.py @@ -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. diff --git a/erpnext/stock/doctype/stock_entry/test_stock_entry.py b/erpnext/stock/doctype/stock_entry/test_stock_entry.py index 6717a097953..db4a0fe0f46 100644 --- a/erpnext/stock/doctype/stock_entry/test_stock_entry.py +++ b/erpnext/stock/doctype/stock_entry/test_stock_entry.py @@ -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() diff --git a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py index 2dd1a98e148..4855327b08e 100644 --- a/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py +++ b/erpnext/stock/doctype/stock_ledger_entry/test_stock_ledger_entry.py @@ -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: diff --git a/erpnext/stock/doctype/stock_reservation_entry/test_stock_reservation_entry.py b/erpnext/stock/doctype/stock_reservation_entry/test_stock_reservation_entry.py index 6e37d246e7f..7c17800555a 100644 --- a/erpnext/stock/doctype/stock_reservation_entry/test_stock_reservation_entry.py +++ b/erpnext/stock/doctype/stock_reservation_entry/test_stock_reservation_entry.py @@ -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" diff --git a/erpnext/stock/doctype/stock_settings/test_stock_settings.py b/erpnext/stock/doctype/stock_settings/test_stock_settings.py index cce4ce74f41..138cb536995 100644 --- a/erpnext/stock/doctype/stock_settings/test_stock_settings.py +++ b/erpnext/stock/doctype/stock_settings/test_stock_settings.py @@ -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): diff --git a/erpnext/stock/doctype/warehouse/test_warehouse.py b/erpnext/stock/doctype/warehouse/test_warehouse.py index 50f1a482e87..fc5feff5812 100644 --- a/erpnext/stock/doctype/warehouse/test_warehouse.py +++ b/erpnext/stock/doctype/warehouse/test_warehouse.py @@ -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") diff --git a/erpnext/subcontracting/doctype/subcontracting_bom/test_subcontracting_bom.py b/erpnext/subcontracting/doctype/subcontracting_bom/test_subcontracting_bom.py index f94fc806199..a831211af93 100644 --- a/erpnext/subcontracting/doctype/subcontracting_bom/test_subcontracting_bom.py +++ b/erpnext/subcontracting/doctype/subcontracting_bom/test_subcontracting_bom.py @@ -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): diff --git a/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py b/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py index f52b03a3b75..913a15d40c8 100644 --- a/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py +++ b/erpnext/subcontracting/doctype/subcontracting_order/test_subcontracting_order.py @@ -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() diff --git a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py index eaa1930a966..da3920aaa41 100644 --- a/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py +++ b/erpnext/subcontracting/doctype/subcontracting_receipt/test_subcontracting_receipt.py @@ -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()