If you eat a food that you don't want LO to consume (say, dairy if you are on a dairy free diet) or a beer.....how long does it take for that food/drink to get out of your system?

My birthday is next week and I'm DYING for some pizza/fresh mozzarella and I'm dairy free currently to help DS's tummy troubles. I exclusively pump so am wondering if I could in theory eat the dairy and then pump and dump.....