def testGetParentFileEntry(self):
    test_file = u'/test_data/testdir_fake/file1.txt'
    path_spec = fake_path_spec.FakePathSpec(location=test_file)
    file_entry = self._file_system.GetFileEntryByPathSpec(path_spec)
    self.assertIsNotNone(file_entry)

    parent_file_entry = file_entry.GetParentFileEntry()

    self.assertIsNotNone(parent_file_entry)

    self.assertEqual(parent_file_entry.name, u'testdir_fake')
Add a permission to a user.
dataset/ETHPy150Open log2timeline/dfvfs/tests/vfs/fake_file_entry.py/FakeFileEntryTest.testGetParentFileEntry--crossover with--dataset/ETHPy150Open mozilla/kitsune/kitsune/users/tests/__init__.py/add_permission