'Set up the tests, giving ourselves a detector object to play with and
setting up its testable knobs to refer to our mocked versions.'

def setUp(self):

    self.detector = process._FDDetector()
    self.detector.listdir = self.listdir
    self.detector.getpid = self.getpid
    self.detector.openfile = self.openfile
    self._files = [0, 1, 2]
    self.addCleanup(self.replaceResourceModule, sys.modules.get('resource'))
