コード例 #1
0
 def test_create_daily_report_when_average_time_does_not_change(self, *args):
     """Testing output when average time increases. Expected: zero change"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert ", change +0.000%" in output_message
コード例 #2
0
 def test_create_daily_report_when_average_time_increases_twice(self, *args):
     """Testing output when average time increases twice. Expected: 100% increase"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert ", change +100.000%" in output_message
コード例 #3
0
 def test_create_daily_report_when_average_time_decreases(self, *args):
     """Testing output when average time increases. Expected: negative change"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert ", change -" in output_message
コード例 #4
0
 def test_create_daily_report_when_single_entry_was_uploaded(self, *args):
     """Testing stddev value when single data entry was uploaded. Expected: 0"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert ", stddev 0.00" in output_message
コード例 #5
0
 def test_create_daily_report_when_no_historical_data_was_uploaded(self, *args):
     """Testing output when no historical data is available. Expected: no message."""
     output_message = create_report(["test_bq_table"], "test", False)
     self.assertEqual(output_message, "")
コード例 #6
0
 def test_create_daily_report_when_average_time_does_not_change(
         self, *args):
     """Testing output when average time increases. Expected: zero change"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert ", change +0.000%" in output_message
コード例 #7
0
 def test_create_daily_report_when_no_data_was_uploaded(self, *args):
     """Testing creating report when no data was uploaded. Expected: Error message"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert "no test results uploaded in recent 24h." in output_message
コード例 #8
0
 def test_create_daily_report_when_average_time_decreases(self, *args):
     """Testing output when average time increases. Expected: negative change"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert ", change -" in output_message
コード例 #9
0
 def test_create_daily_report_when_average_time_increases_twice(
         self, *args):
     """Testing output when average time increases twice. Expected: 100% increase"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert ", change +100.000%" in output_message
コード例 #10
0
 def test_create_daily_report_when_no_historical_data_was_uploaded(
         self, *args):
     """Testing output when no historical data is available. Expected: no message."""
     output_message = create_report(["test_bq_table"], "test", False)
     self.assertEqual(output_message, "")
コード例 #11
0
 def test_create_daily_report_when_single_entry_was_uploaded(self, *args):
     """Testing stddev value when single data entry was uploaded. Expected: 0"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert ", stddev 0.00" in output_message
コード例 #12
0
 def test_create_daily_report_when_no_data_was_uploaded(self, *args):
     """Testing creating report when no data was uploaded. Expected: Error message"""
     output_message = create_report(["test_bq_table"], "test", False)
     assert "no test results uploaded in recent 24h." in output_message