Exemple #1
0
 def test_initialize(self, mock_Client):
     collectd_transmission.config(self.config)
     collectd_transmission.initialize()
     mock_Client.assert_called_with(
         address='http://localhost:9091/transmission/rpc',
         user='******',
         password='******',
         timeout=5)
Exemple #2
0
 def test_get_stats(self, mock_Client):
     collectd_transmission.collectd = mock.MagicMock()
     collectd_transmission.config(self.config)
     collectd_transmission.initialize()
     collectd_transmission.get_stats()
     mock_Client.session_status.assert_called()
Exemple #3
0
 def test_config(self):
     collectd_transmission.config(self.config)