Boil the beans in advance in a pressure cooker. Heat some oil in a pan and fry the legs lightly on all sides. Remove them, add a little more oil and fry the crushed onions, chopped peppers, mushrooms and garlic.
Season with some spices and add the grated tomatoes. Let the sauce boil briefly and transfer it into a pot. Add the legs, pour on the wine and some more spices if needed. Put the lid on and put in the oven to cook at 410°F (210 °C) for about 1 hour.
Serve the chicken with beans in a pot with a little chopped parsley.