chore: whitespace trimming

This commit is contained in:
Ankush Menat
2021-09-01 20:23:48 +05:30
parent 77aef302e4
commit f0bcb753fb
26 changed files with 83 additions and 83 deletions

View File

@@ -533,7 +533,7 @@ def set_first_response_time(communication, method):
def is_first_response(issue):
responses = frappe.get_all('Communication', filters = {'reference_name': issue.name, 'sent_or_received': 'Sent'})
if len(responses) == 1:
if len(responses) == 1:
return True
return False
@@ -562,7 +562,7 @@ def calculate_first_response_time(issue, first_responded_on):
# both issue creation and first response were after working hours
else:
return 1.0 # this should ideally be zero, but it gets reset when the next response is sent if the value is zero
else:
return 1.0

View File

@@ -120,7 +120,7 @@ class TestIssue(TestSetUp):
issue.reload()
self.assertEqual(flt(issue.total_hold_time, 2), 2700)
self.assertEqual(issue.resolution_by, get_datetime("2020-03-04 16:45"))
self.assertEqual(issue.resolution_by, get_datetime("2020-03-04 16:45"))
creation = get_datetime("2020-03-04 5:05")
create_communication(issue.name, "test@admin.com", "Sent", creation)
@@ -176,7 +176,7 @@ class TestFirstResponseTime(TestSetUp):
# issue creation and first response are on consecutive days
def test_first_response_time_case6(self):
"""
Test frt when the issue was created before working hours and the first response is also sent before working hours, but on the next day.
Test frt when the issue was created before working hours and the first response is also sent before working hours, but on the next day.
"""
issue = create_issue_and_communication(get_datetime("06-28-2021 6:00"), get_datetime("06-29-2021 6:00"))
self.assertEqual(issue.first_response_time, 28800.0)
@@ -198,7 +198,7 @@ class TestFirstResponseTime(TestSetUp):
def test_first_response_time_case9(self):
"""
Test frt when the issue was created before working hours and the first response is sent on the next day, which is not a work day.
"""
"""
issue = create_issue_and_communication(get_datetime("06-25-2021 6:00"), get_datetime("06-26-2021 11:00"))
self.assertEqual(issue.first_response_time, 28800.0)
@@ -226,7 +226,7 @@ class TestFirstResponseTime(TestSetUp):
def test_first_response_time_case13(self):
"""
Test frt when the issue was created during working hours and the first response is sent on the next day, which is not a work day.
"""
"""
issue = create_issue_and_communication(get_datetime("06-25-2021 12:00"), get_datetime("06-26-2021 11:00"))
self.assertEqual(issue.first_response_time, 21600.0)
@@ -342,7 +342,7 @@ class TestFirstResponseTime(TestSetUp):
"""
issue = create_issue_and_communication(get_datetime("06-25-2021 20:00"), get_datetime("06-27-2021 11:00"))
self.assertEqual(issue.first_response_time, 1.0)
def create_issue_and_communication(issue_creation, first_responded_on):
issue = make_issue(issue_creation, index=1)
sender = create_user("test@admin.com")