Chickpeas (main content in Hummus) are high in Tryptophan, which is the precursor to Serotonin. The Serotonin molecule itself is not able to pass the blood-brain-barrier.
Strangely my urine Serotonin is fivefold increased to the reference range (50-250 µg/g creatinine) and I got constipation instead of diarrhea.
Both low (<50 µg) and very high peripheral Serotonin causes constipation while slightly elevated Serotonin (>250 µg) causes diarrhea. But maybe very high Serotonin and constipation means something is wrong with the Serotonin receptors.
Another reason why chickpeas and cashews may be helpful in constipation is that they are high in magnesium (which draws water out of the blood into the colon opposite to calcium which draws water out of the colon into the blood), but soy beans are much higher in Mg.