def test_empty_results_to_values(self): results = () plugin = dsplugins.MySqlMonitorPlugin() values = plugin.query_results_to_values(results) self.assertEquals(values, {})
def test_results_to_values(self): results = (('Value', sentinel.value), ) plugin = dsplugins.MySqlMonitorPlugin() values = plugin.query_results_to_values(results) self.assertEquals(values, {'value': (sentinel.value, 'N')})
def test_results_to_values(self, time): time.time.return_value = sentinel.current_time results = (('Value', sentinel.value), ) plugin = dsplugins.MySqlMonitorPlugin() values = plugin.query_results_to_values(results) self.assertEquals(values, {'value': (sentinel.value, sentinel.current_time)})