Skip to content

Commit ff28a0c

Browse files
authored
Merge pull request #715 from github-community-projects/fix/test-time-to-first-review-type-error
fix: correct TypeError test to exercise exception handler
2 parents 8bd2f25 + 7a3a883 commit ff28a0c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test_time_to_first_review.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,10 @@ def test_measure_time_to_first_review_ignore_users(self):
115115
def test_measure_time_to_first_review_type_error_path(self):
116116
"""Test the except TypeError error handling path."""
117117
mock_issue = MagicMock()
118-
mock_issue.created_at = 12345
118+
mock_issue.created_at = "2023-01-01T00:00:00Z"
119119

120120
mock_pr = MagicMock()
121-
mock_pr.reviews.return_value = [MagicMock()]
121+
mock_pr.reviews.side_effect = TypeError("ghost user")
122122

123123
result = measure_time_to_first_review(mock_issue, mock_pr, None, [])
124124
self.assertIsNone(result)

0 commit comments

Comments
 (0)