mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-03 04:09:11 +00:00
refactor: add bare unit test cases
mainly for LLMs to catch up with the convention
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
import json
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.tests import IntegrationTestCase, UnitTestCase
|
||||
from frappe.tests.utils import make_test_records
|
||||
from frappe.utils import flt
|
||||
|
||||
@@ -23,6 +23,15 @@ test_dependencies = ["Payment Term", "Payment Terms Template"]
|
||||
test_records = frappe.get_test_records("Customer")
|
||||
|
||||
|
||||
class UnitTestCustomer(UnitTestCase):
|
||||
"""
|
||||
Unit tests for Customer.
|
||||
Use this class for testing individual functions and methods.
|
||||
"""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class TestCustomer(IntegrationTestCase):
|
||||
def setUp(self):
|
||||
if not frappe.get_value("Item", "_Test Item"):
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# See license.txt
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.tests import IntegrationTestCase, UnitTestCase
|
||||
|
||||
from erpnext.controllers.queries import item_query
|
||||
|
||||
@@ -18,6 +18,15 @@ 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")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import frappe
|
||||
from frappe.tests import IntegrationTestCase
|
||||
from frappe.tests import IntegrationTestCase, UnitTestCase
|
||||
from frappe.utils import add_days, add_months, flt, getdate, nowdate
|
||||
|
||||
from erpnext.controllers.accounts_controller import InvalidQtyError
|
||||
@@ -10,6 +10,15 @@ from erpnext.controllers.accounts_controller import InvalidQtyError
|
||||
test_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)
|
||||
|
||||
Reference in New Issue
Block a user