Mix the onion, capers, pesto and oil. Flake the tuna into a bowl with the pasta and tomatoes, then stir in the pesto mix.