Skip to content

Commit 72deeed

Browse files
committed
Fix JIRA helper tests to comply with JIRA API specification
- Remove test_issue_from_jira_is_active_with_unknown_status_and_none_resolution - Remove test_issue_from_jira_is_active_without_status_category_with_none_string_resolution These tests checked for resolution field as string 'None', which violates JIRA API spec. According to JIRA API, resolution is either an object with properties (id, name, etc) or null, never a string value. Remaining 12 tests verify correct behavior per the API spec.
1 parent 4a2fa85 commit 72deeed

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

unittests/test_jira_helper.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ def test_issue_from_jira_is_active_with_unknown_status_and_resolution(self):
6666
result = jira_helper.issue_from_jira_is_active(issue)
6767
self.assertFalse(result, "Issue with unknown status and resolution should be inactive")
6868

69-
def test_issue_from_jira_is_active_with_unknown_status_and_none_resolution(self):
70-
"""Test that issues with unknown status category and 'None' resolution are treated as active"""
71-
issue = self.create_mock_jira_issue(status_category_key="custom_status", resolution="None")
72-
result = jira_helper.issue_from_jira_is_active(issue)
73-
self.assertTrue(result, "Issue with unknown status and 'None' resolution should be active")
74-
7569
def test_issue_from_jira_is_active_without_status_category_and_no_resolution(self):
7670
"""Test fallback to resolution check when status category is not available"""
7771
issue = Mock()
@@ -88,14 +82,6 @@ def test_issue_from_jira_is_active_without_status_category_with_resolution(self)
8882
result = jira_helper.issue_from_jira_is_active(issue)
8983
self.assertFalse(result, "Issue without status category but with resolution should be inactive")
9084

91-
def test_issue_from_jira_is_active_without_status_category_with_none_string_resolution(self):
92-
"""Test that 'None' string resolution is treated as active"""
93-
issue = Mock()
94-
issue.fields = Mock()
95-
issue.fields.resolution = "None"
96-
result = jira_helper.issue_from_jira_is_active(issue)
97-
self.assertTrue(result, "Issue with 'None' string resolution should be active")
98-
9985
def test_issue_from_jira_is_active_without_fields(self):
10086
"""Test that issues without fields attribute fall back gracefully"""
10187
issue = Mock(spec=[]) # Mock with no attributes

0 commit comments

Comments
 (0)