chore: remove redundant declarations of test_records

This commit is contained in:
David
2024-10-11 04:03:46 +02:00
parent 922b5d1be5
commit a2d22c3f42
52 changed files with 2 additions and 101 deletions

View File

@@ -6,8 +6,6 @@ import frappe
from frappe import ValidationError
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Bank Account')
class TestBankAccount(IntegrationTestCase):
def test_validate_iban(self):

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Cheque Print Template')
class TestChequePrintTemplate(IntegrationTestCase):
pass

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Mode of Payment')
class TestModeofPayment(IntegrationTestCase):
pass

View File

@@ -5,8 +5,6 @@ import unittest
import frappe
from frappe.tests import IntegrationTestCase
test_records = frappe.get_test_records("Monthly Distribution")
class TestMonthlyDistribution(IntegrationTestCase):
pass

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Payment Gateway Account')
IGNORE_TEST_RECORD_DEPENDENCIES = ["Payment Gateway"]

View File

@@ -381,4 +381,3 @@ def create_cost_center(cc_name):
EXTRA_TEST_RECORD_DEPENDENCIES = ["Customer", "Cost Center"]
test_records = frappe.get_test_records("Period Closing Voucher")

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Purchase Taxes and Charges Template')
class TestPurchaseTaxesandChargesTemplate(IntegrationTestCase):
pass

View File

@@ -5,8 +5,6 @@ import unittest
import frappe
from frappe.tests import IntegrationTestCase
test_records = frappe.get_test_records("Sales Taxes and Charges Template")
class TestSalesTaxesandChargesTemplate(IntegrationTestCase):
pass

View File

@@ -9,8 +9,6 @@ from erpnext.accounts.doctype.tax_rule.tax_rule import ConflictingTaxRule, get_t
from erpnext.crm.doctype.opportunity.opportunity import make_quotation
from erpnext.crm.doctype.opportunity.test_opportunity import make_opportunity
test_records = frappe.get_test_records("Tax Rule")
class TestTaxRule(IntegrationTestCase):
@classmethod

View File

@@ -6,8 +6,6 @@ import unittest
import frappe
from frappe.tests import IntegrationTestCase
test_records = frappe.get_test_records("Location")
class TestLocation(IntegrationTestCase):
def runTest(self):

View File

@@ -1309,5 +1309,3 @@ def get_requested_qty(item_code="_Test Item", warehouse="_Test Warehouse - _TC")
EXTRA_TEST_RECORD_DEPENDENCIES = ["BOM", "Item Price"]
test_records = frappe.get_test_records("Purchase Order")

View File

@@ -10,7 +10,7 @@ from erpnext.controllers.website_list_for_contact import get_customers_suppliers
from erpnext.exceptions import PartyDisabled
EXTRA_TEST_RECORD_DEPENDENCIES = ["Payment Term", "Payment Terms Template"]
test_records = frappe.get_test_records("Supplier")
from frappe.tests import IntegrationTestCase, UnitTestCase

View File

@@ -9,8 +9,6 @@ from frappe.utils import random_string, today
from erpnext.crm.doctype.lead.lead import make_opportunity
from erpnext.crm.utils import get_linked_prospect
test_records = frappe.get_test_records("Lead")
class TestLead(IntegrationTestCase):
def test_make_customer(self):

View File

@@ -11,8 +11,6 @@ from erpnext.crm.doctype.lead.test_lead import make_lead
from erpnext.crm.doctype.opportunity.opportunity import make_quotation
from erpnext.crm.utils import get_linked_communication_list
test_records = frappe.get_test_records("Opportunity")
class TestOpportunity(IntegrationTestCase):
def test_opportunity_status(self):

View File

@@ -14,8 +14,6 @@ from erpnext.maintenance.doctype.maintenance_schedule.maintenance_schedule impor
from erpnext.stock.doctype.item.test_item import create_item
from erpnext.stock.doctype.stock_entry.test_stock_entry import make_serialized_item
# test_records = frappe.get_test_records('Maintenance Schedule')
class TestMaintenanceSchedule(IntegrationTestCase):
def test_events_should_be_created_and_deleted(self):

View File

@@ -6,8 +6,6 @@ import frappe
from frappe.tests import IntegrationTestCase
from frappe.utils.data import today
# test_records = frappe.get_test_records('Maintenance Visit')
class TestMaintenanceVisit(IntegrationTestCase):
pass

View File

@@ -5,8 +5,6 @@ import unittest
import frappe
from frappe.tests import IntegrationTestCase
test_records = frappe.get_test_records("Operation")
class TestOperation(IntegrationTestCase):
pass

View File

@@ -2713,6 +2713,3 @@ def make_wo_order_test_record(**args):
if not args.do_not_submit:
wo_order.submit()
return wo_order
test_records = frappe.get_test_records("Work Order")

View File

@@ -13,7 +13,7 @@ from erpnext.manufacturing.doctype.workstation.workstation import (
)
EXTRA_TEST_RECORD_DEPENDENCIES = ["Warehouse"]
test_records = frappe.get_test_records("Workstation")
make_test_records("Workstation")

View File

@@ -2,5 +2,3 @@
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records("Activity Type")

View File

@@ -10,7 +10,6 @@ from erpnext.projects.doctype.task.test_task import create_task
from erpnext.selling.doctype.sales_order.sales_order import make_project as make_project_from_so
from erpnext.selling.doctype.sales_order.test_sales_order import make_sales_order
test_records = frappe.get_test_records("Project")
IGNORE_TEST_RECORD_DEPENDENCIES = ["Sales Order"]

View File

@@ -10,5 +10,4 @@ class TestProjectUpdate(IntegrationTestCase):
pass
test_records = frappe.get_test_records("Project Update")
IGNORE_TEST_RECORD_DEPENDENCIES = ["Sales Order"]

View File

@@ -20,7 +20,6 @@ from erpnext.tests.utils import create_test_contact_and_address
IGNORE_TEST_RECORD_DEPENDENCIES = ["Price List"]
EXTRA_TEST_RECORD_DEPENDENCIES = ["Payment Term", "Payment Terms Template"]
test_records = frappe.get_test_records("Customer")
class UnitTestCustomer(UnitTestCase):

View File

@@ -2,5 +2,3 @@
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records("Industry Type")

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Installation Note')
class TestInstallationNote(IntegrationTestCase):
pass

View File

@@ -3,8 +3,6 @@
import frappe
test_records = frappe.get_test_records("Product Bundle")
def make_product_bundle(parent, items, qty=None):
if frappe.db.exists("Product Bundle", parent):

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Authorization Rule')
class TestAuthorizationRule(IntegrationTestCase):
pass

View File

@@ -2,5 +2,3 @@
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records("Branch")

View File

@@ -2,5 +2,3 @@
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records("Brand")

View File

@@ -5,5 +5,3 @@ IGNORE_TEST_RECORD_DEPENDENCIES = ["Price List"]
import frappe
test_records = frappe.get_test_records("Customer Group")

View File

@@ -26,6 +26,3 @@ def create_department(department_name, parent_department=None):
).insert()
return doc
test_records = frappe.get_test_records("Department")

View File

@@ -3,8 +3,6 @@
import frappe
# test_records = frappe.get_test_records('Designation')
def create_designation(**args):
args = frappe._dict(args)

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Email Digest')
class TestEmailDigest(IntegrationTestCase):
pass

View File

@@ -9,8 +9,6 @@ from frappe.tests import IntegrationTestCase
import erpnext
from erpnext.setup.doctype.employee.employee import InactiveEmployeeStatusError
test_records = frappe.get_test_records("Employee")
class TestEmployee(IntegrationTestCase):
def test_employee_status_left(self):

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Party Type')
class TestPartyType(IntegrationTestCase):
pass

View File

@@ -2,5 +2,3 @@
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records("Print Heading")

View File

@@ -2,5 +2,3 @@
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records("Quotation Lost Reason")

View File

@@ -3,6 +3,4 @@
import frappe
test_records = frappe.get_test_records("Sales Partner")
IGNORE_TEST_RECORD_DEPENDENCIES = ["Item Group"]

View File

@@ -5,6 +5,4 @@ EXTRA_TEST_RECORD_DEPENDENCIES = ["Employee"]
import frappe
test_records = frappe.get_test_records("Sales Person")
IGNORE_TEST_RECORD_DEPENDENCIES = ["Item Group"]

View File

@@ -2,5 +2,3 @@
# See license.txt
import frappe
test_records = frappe.get_test_records("Supplier Group")

View File

@@ -2,5 +2,3 @@
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records("Terms and Conditions")

View File

@@ -3,6 +3,4 @@
import frappe
test_records = frappe.get_test_records("Territory")
IGNORE_TEST_RECORD_DEPENDENCIES = ["Item Group"]

View File

@@ -2,5 +2,3 @@
# License: GNU General Public License v3. See license.txt
import frappe
test_records = frappe.get_test_records("UOM")

View File

@@ -6,8 +6,6 @@ import frappe
from frappe.tests import IntegrationTestCase
from frappe.utils import random_string
# test_records = frappe.get_test_records('Vehicle')
class TestVehicle(IntegrationTestCase):
def test_make_vehicle(self):

View File

@@ -3,9 +3,6 @@
import frappe
test_records = frappe.get_test_records("Item Attribute")
from frappe.tests import IntegrationTestCase, UnitTestCase
from erpnext.stock.doctype.item_attribute.item_attribute import ItemAttributeIncrementError

View File

@@ -1165,6 +1165,3 @@ def distribute_landed_cost_on_items(lcv):
for item in lcv.get("items"):
item.applicable_charges = flt(item.get(based_on)) * flt(lcv.total_taxes_and_charges) / flt(total)
item.applicable_charges = flt(item.applicable_charges, lcv.precision("applicable_charges", item))
test_records = frappe.get_test_records("Landed Cost Voucher")

View File

@@ -4,8 +4,6 @@ import unittest
from frappe.tests import IntegrationTestCase
# test_records = frappe.get_test_records('Manufacturer')
class TestManufacturer(IntegrationTestCase):
pass

View File

@@ -5,5 +5,3 @@
import frappe
# test_ignore = ["Item"]
test_records = frappe.get_test_records("Price List")

View File

@@ -15,8 +15,6 @@ from erpnext.stock.doctype.delivery_note.test_delivery_note import create_delive
from erpnext.stock.doctype.item.test_item import create_item
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry
# test_records = frappe.get_test_records('Quality Inspection')
class UnitTestQualityInspection(UnitTestCase):
"""

View File

@@ -22,7 +22,6 @@ from erpnext.stock.doctype.stock_entry.test_stock_entry import make_serialized_i
from erpnext.stock.doctype.warehouse.test_warehouse import create_warehouse
EXTRA_TEST_RECORD_DEPENDENCIES = ["Item"]
test_records = frappe.get_test_records("Serial No")
class UnitTestSerialNo(UnitTestCase):

View File

@@ -11,8 +11,6 @@ from erpnext.stock.doctype.item.test_item import create_item
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
test_records = frappe.get_test_records("Warehouse")
class UnitTestWarehouse(UnitTestCase):
"""

View File

@@ -5,8 +5,6 @@ import unittest
import frappe
from frappe.tests import IntegrationTestCase
test_records = frappe.get_test_records("Warranty Claim")
class TestWarrantyClaim(IntegrationTestCase):
pass