11"""A module containing unit tests for the time_to_first_response module. 
22
33This module contains unit tests for the measure_time_to_first_response and 
4- get_average_time_to_first_response  functions in the time_to_first_response module.
4+ get_stats_time_to_first_response  functions in the time_to_first_response module.
55The tests use mock GitHub issues and comments to test the functions' behavior. 
66
77Classes: 
88    TestMeasureTimeToFirstResponse: A class to test the measure_time_to_first_response function. 
99    TestGetAverageTimeToFirstResponse: A class to test the 
10-         get_average_time_to_first_response  function. 
10+         get_stats_time_to_first_response  function. 
1111
1212""" 
1313import  unittest 
1616
1717from  classes  import  IssueWithMetrics 
1818from  time_to_first_response  import  (
19-     get_average_time_to_first_response ,
19+     get_stats_time_to_first_response ,
2020    measure_time_to_first_response ,
2121)
2222
@@ -311,14 +311,14 @@ def test_measure_time_to_first_response_ignore_bot(self):
311311        self .assertEqual (result , expected_result )
312312
313313
314- class  TestGetAverageTimeToFirstResponse (unittest .TestCase ):
315-     """Test the get_average_time_to_first_response  function.""" 
314+ class  TestGetStatsTimeToFirstResponse (unittest .TestCase ):
315+     """Test the get_stats_time_to_first_response  function.""" 
316316
317-     def  test_get_average_time_to_first_response (self ):
318-         """Test that get_average_time_to_first_response  calculates the correct average. 
317+     def  test_get_stats_time_to_first_response (self ):
318+         """Test that get_stats_time_to_first_response  calculates the correct average. 
319319
320320        This test creates a list of mock GitHub issues with time to first response 
321-         attributes, calls get_average_time_to_first_response  with the list, and 
321+         attributes, calls get_stats_time_to_first_response  with the list, and 
322322        checks that the function returns the correct average time to first response. 
323323
324324        """ 
@@ -334,12 +334,12 @@ def test_get_average_time_to_first_response(self):
334334        ]
335335
336336        # Call the function and check the result 
337-         result  =  get_average_time_to_first_response (issues_with_metrics )['avg' ]
337+         result  =  get_stats_time_to_first_response (issues_with_metrics )['avg' ]
338338        expected_result  =  timedelta (days = 1.5 )
339339        self .assertEqual (result , expected_result )
340340
341-     def  test_get_average_time_to_first_response_with_all_none (self ):
342-         """Test that get_average_time_to_first_response  with all None data.""" 
341+     def  test_get_stats_time_to_first_response_with_all_none (self ):
342+         """Test that get_stats_time_to_first_response  with all None data.""" 
343343
344344        # Create mock data with all None 
345345        issues_with_metrics  =  [
@@ -348,6 +348,6 @@ def test_get_average_time_to_first_response_with_all_none(self):
348348        ]
349349
350350        # Call the function and check the result 
351-         result  =  get_average_time_to_first_response (issues_with_metrics )
351+         result  =  get_stats_time_to_first_response (issues_with_metrics )
352352        expected_result  =  None 
353353        self .assertEqual (result , expected_result )
0 commit comments