fix: only load data for tests that need it
This commit is contained in:
parent
68a31d3d0d
commit
cf5b57bfac
@ -69,11 +69,7 @@ class TestTaxDetail(unittest.TestCase):
|
||||
'report_name': 'Tax Detail'
|
||||
}, user=frappe.session.user)
|
||||
|
||||
def setUp(self):
|
||||
self.load_testdocs()
|
||||
self.load_defcols()
|
||||
|
||||
def tearDown(self):
|
||||
def rm_testdocs(self):
|
||||
"Remove the Company and all data"
|
||||
from erpnext.setup.doctype.company.delete_company_transactions import delete_company_transactions
|
||||
delete_company_transactions(self.company.name)
|
||||
@ -81,6 +77,8 @@ class TestTaxDetail(unittest.TestCase):
|
||||
|
||||
|
||||
def test_report(self):
|
||||
self.load_testdocs()
|
||||
self.load_defcols()
|
||||
report_name = save_custom_report(
|
||||
'Tax Detail',
|
||||
'_Test Tax Detail',
|
||||
@ -119,6 +117,8 @@ class TestTaxDetail(unittest.TestCase):
|
||||
self.assertListEqual(data.get('report_summary'),
|
||||
[{'label': label, 'datatype': 'Currency', 'value': value} for label, value in expected])
|
||||
|
||||
self.rm_testdocs()
|
||||
|
||||
def test_filter_match(self):
|
||||
# None - treated as -inf number except range
|
||||
self.assertTrue(filter_match(None, '!='))
|
||||
|
Loading…
Reference in New Issue
Block a user