Almost certainly in Hollywood, on a studio set. In 1942, when Casablanca was made, location shooting of any sort was a rarity, except perhaps for some of the long shots in Westerns. And, of course, the film was certainly not shot in Morocco. In fact, as is well known, the movie makes a glaring error by placing Casablanca in the desert, whereas in reality it is by the sea.