Give me a Brake

I want to remove my brake caliper to inspect it and, if defective, get a new/rebuilt one at the parts store with the core in hand so I don’t have to make two trips. My question is, how do I keep the fluid in the system so I don’t have to bench bleed the master cyklinder if the fluid drains the MC dry? Is there a plug for brake lines? Thank for any help.