Do mechanical drain traps exist for retrofit on inaccessible plumbing?
Sounds like what you want is a screw-down test plug:



Test Plug

These come in the major drain pipe sizes.  The rubber provides a good, temporary seal even if the surface is a bit irregular.  I'm used to seeing them with a metal top and bottom plate, but I guess they have moved on to plastic.