

def testRecursiveDownload(self):
    'Check we can export a file without errors.'
    with utils.TempDirectory() as tmpdir:
        export_utils.RecursiveDownload(aff4.FACTORY.Open(self.out, token=self.token), tmpdir, overwrite=True)
        expected_outdir = os.path.join(self, self.out.Path()[1:])
        self.assertTrue(('testfile1' in os.listdir(expected_outdir)))
        full_outdir = os.path.join(expected_outdir, 'testdir1', 'testdir2')
        self.assertTrue(('testfile4' in os.listdir(full_outdir)))

dataset/ETHPy150Open google/grr/grr/lib/export_utils_test.py TestExports.testRecursiveDownload/VarMisuse@59/90 `tmpdir`->`self`