mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 08:11:19 +00:00
refactor(test): tax rule; removed setUpClass, tearDownClass
This commit is contained in:
@@ -13,19 +13,16 @@ months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
|
||||
|
||||
|
||||
class TestIssueAnalytics(ERPNextTestSuite):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
frappe.db.sql("delete from `tabIssue` where company='_Test Company'")
|
||||
def setUp(self):
|
||||
frappe.db.set_single_value("Support Settings", "track_service_level_agreement", 1)
|
||||
|
||||
current_month_date = getdate()
|
||||
last_month_date = add_months(current_month_date, -1)
|
||||
cls.current_month = str(months[current_month_date.month - 1]).lower()
|
||||
cls.last_month = str(months[last_month_date.month - 1]).lower()
|
||||
self.current_month = str(months[current_month_date.month - 1]).lower()
|
||||
self.last_month = str(months[last_month_date.month - 1]).lower()
|
||||
if current_month_date.year != last_month_date.year:
|
||||
cls.current_month += "_" + str(current_month_date.year)
|
||||
cls.last_month += "_" + str(last_month_date.year)
|
||||
self.current_month += "_" + str(current_month_date.year)
|
||||
self.last_month += "_" + str(last_month_date.year)
|
||||
|
||||
def test_issue_analytics(self):
|
||||
create_service_level_agreements_for_issues()
|
||||
|
||||
Reference in New Issue
Block a user