mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-12 17:51:20 +00:00
refactor(test): make financial reports deterministic
This commit is contained in:
@@ -16,12 +16,6 @@ from erpnext.accounts.doctype.financial_report_template.test_financial_report_te
|
|||||||
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
|
from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journal_entry
|
||||||
from erpnext.accounts.utils import get_currency_precision, get_fiscal_year
|
from erpnext.accounts.utils import get_currency_precision, get_fiscal_year
|
||||||
|
|
||||||
# On IntegrationTestCase, the doctype test records and all
|
|
||||||
# link-field test record dependencies are recursively loaded
|
|
||||||
# Use these module variables to add/remove to/from that list
|
|
||||||
EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
|
|
||||||
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
|
|
||||||
|
|
||||||
|
|
||||||
class TestDependencyResolver(FinancialReportTemplateTestCase):
|
class TestDependencyResolver(FinancialReportTemplateTestCase):
|
||||||
"""Test cases for DependencyResolver class"""
|
"""Test cases for DependencyResolver class"""
|
||||||
|
|||||||
@@ -2,28 +2,17 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.tests import IntegrationTestCase
|
|
||||||
from frappe.tests.utils import make_test_records
|
|
||||||
|
|
||||||
# On IntegrationTestCase, the doctype test records and all
|
from erpnext.tests.utils import ERPNextTestSuite
|
||||||
# link-field test record dependencies are recursively loaded
|
|
||||||
# Use these module variables to add/remove to/from that list
|
|
||||||
EXTRA_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
|
|
||||||
IGNORE_TEST_RECORD_DEPENDENCIES = [] # eg. ["User"]
|
|
||||||
|
|
||||||
|
|
||||||
class TestFinancialReportTemplate(IntegrationTestCase):
|
class FinancialReportTemplateTestCase(ERPNextTestSuite):
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class FinancialReportTemplateTestCase(IntegrationTestCase):
|
|
||||||
"""Utility class with common setup and helper methods for all test classes"""
|
"""Utility class with common setup and helper methods for all test classes"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
"""Set up test data"""
|
"""Set up test data"""
|
||||||
make_test_records("Company")
|
super().setUpClass()
|
||||||
make_test_records("Fiscal Year")
|
|
||||||
cls.create_test_template()
|
cls.create_test_template()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user