Cut off the bean tips, halve the beans. Cook for 5 minutes, drain and quench. Put aside.
Chop the tomatoes and keep the juice. Heat the oil, brown the onion and garlic while stirring. Add sugar and caramelize. Pour vinegar, cook for 1 minute. Then add the tomato pieces with the juice, the basil, the olives and the pepper and cook for 5 minutes without the lid. Add the beans to the sauce, let cook for 10 minutes. Garnish with basil leaves.