def test_operations(self):
    with mock.patch('oslo_messaging.get_rpc_server') as get_rpc_server:
        rpc_server = get_rpc_server.return_value
        service = rpc.Service(self.host, self.topic)
        service.start()
        rpc_server.start.assert_called_once_with()
        service.stop()
        rpc_server.stop.assert_called_once_with()
        rpc_server.wait.assert_called_once_with()
def test_operations(self):
    with mock.patch('oslo_messaging.get_rpc_server') as get_rpc_server:
        rpc_server = get_rpc_server.return_value
        service = rpc.Service(self.host, self.topic)
        service.start()
        rpc_server.start.assert_called_once_with()
        service.stop()
        rpc_server.stop.assert_called_once_with()
        rpc_server.wait.assert_called_once_with()