def test_connections_rate_captured(self, mock_rate, mock_run): mock_run.return_value = STDOUT mock_rate.return_value = 3 stats = mysql.fetch_stats(user='******', password='******') self.assertEqual(stats['mysql_connections_rate']['value'], 3)
def test_threads_connected(self, mock_run): mock_run.return_value = STDOUT stats = mysql.fetch_stats(user='******', password='******') self.assertEqual(stats['mysql_threads_connected']['value'], 15)