My boyfriend and I have this trick we play on each other using the dog.
Our bathroom is a converted hallway to the 3rd floor, where the bedrooms are. The dog knows that "go night-night" means to go upstairs and lay in her dog bed. So if one of us is sitting on the crapper, the other one tells Miss Tess to go night night and she knows how to open the bathroom door and goes and pesters whoever is using the loo.
It's really funny. This is her. She's half old english bulldogge and half boxer and all genius.