示例#1
0
    def test_temporary_folders(self):
        """
        A list of all instantiated temp folders is kept as class member
        to help with final cleanup.
        """
        temp = mk.makeLocalTestFilesystem()

        temporary_segments = LocalTestFilesystem.getAllTemporaryFolders()

        # We check that the list contains the new temporary folder,
        # but it also contains other elements.
        # This test depends on the fact that mk.fs was already instantiated.
        self.assertContains(temp.temp_segments, temporary_segments)
        self.assertGreater(len(temporary_segments), 1)
示例#2
0
 def setUp(self):
     super(FileSystemTestCase, self).setUp()
     # Initialized only to clean the home folder.
     test_filesystem = LocalTestFilesystem(avatar=self.avatar)
     test_filesystem.cleanHomeFolder()