def test_get_refresh_details_not_running(self): yield self.create_fake_rpc_service() rpc_service = services.getServiceNamed("rpc") service = RackNetworksMonitoringService( rpc_service, Clock(), enable_monitoring=False, enable_beaconing=False, ) service.running = 0 details = yield service.getRefreshDetails() self.assertEqual((None, None, None), details)
def test_get_refresh_details_running(self): yield self.create_fake_rpc_service() rpc_service = services.getServiceNamed("rpc") service = RackNetworksMonitoringService( rpc_service, Clock(), enable_monitoring=False, enable_beaconing=False, ) service.running = 1 self.metadata_creds.update({ "consumer_key": "my-key", "token_key": "my-token", "token_secret": "my-secret", }) details = yield service.getRefreshDetails() self.assertEqual(("http://localhost/MAAS", "", self.metadata_creds), details)