Fill a large pot with water, add 1/2 cup salt and heat to a boil.
Blanch the beans in the boiling salted water until tender, about 5 minutes, and then transfer to a towel to drain. Set aside until beans are needed.
In a medium saucepan melt 2 1/2 tablespoons butter and add the 4 tablespoons flour. Cook, stirring often, at least 5 minutes on low heat. Add the milk slowly, whisking constantly, until the flour is dissolved.
In a small pan, toast the fenugreek leaves over medium heat for about 5 minutes, just to bring out their smell and taste. Turn off heat and grind the leaves in a spice grinder or food processor. Add the ground leaves to the sauce.
In another pan, over medium heat, add the remaining 2 1/2 tablespoons butter and heat until it begins foaming. Add the mushrooms to the pan and cook until well caramelized, about 10 minutes. Add the shallot to the mushrooms, cook 2 more minutes. Add the vermouth to the pan and increase the heat to high to quickly cook off the alcohol. When the pan looks dry, transfer the mushrooms to a paper towel-lined tray and leave to cool.
Once the mushrooms are cool enough to handle, roughly chop them and add to the sauce along with the thyme sprigs. Let the sauce cook over low heat for about 1 hour, stirring often.
Preheat the oven to 325 degrees F.
Add the beans to a casserole dish and arrange nicely. Pour over the mushroom sauce and bake in an oven for 15 to 20 minutes until lightly browned.
Remove the casserole from the oven and garnish with the onion rings.
In a medium heavy-bottomed pot add the 2 cups oil and heat until about 350 degrees F, using a deep-fry or candy thermometer to register the temperature.
Slice the shallots into thin rings. Toss the shallots with 2 cups flour and shake of the excess flour.
Add the dusted onion rings to the hot oil and fry until golden brown. Remove from the pot and drain on a paper towel-lined baking sheet to drain the excess oil.