def setUp(self): """Creates a fake home directory and puts an empty Maildir in it.""" self.home = tempfile.mkdtemp() self.empty_home = tempfile.mkdtemp() self.root = os.path.join(self.home, "Maildir") self.create_maildir() self.command = "scripts/mdls" CommandTestMixin.setUp(self)
def tearDown(self): """Removes the temporary home directory.""" CommandTestMixin.tearDown(self) shutil.rmtree(self.home) shutil.rmtree(self.empty_home)