def testIntialize(self): """Tests the __init__ function.""" path_spec = ntfs_path_spec.NTFSPathSpec(mft_attribute=1, mft_entry=41, parent=self._qcow_path_spec) file_entry = self._file_system.GetFileEntryByPathSpec(path_spec) fsntfs_attribute = file_entry._fsntfs_file_entry.get_attribute(0) ntfs_attribute = ntfs_file_entry.StandardInformationNTFSAttribute( fsntfs_attribute) self.assertIsNotNone(ntfs_attribute) with self.assertRaises(errors.BackEndError): ntfs_file_entry.StandardInformationNTFSAttribute(None)
def testAttributeType(self): """Test the attribute_type property.""" path_spec = ntfs_path_spec.NTFSPathSpec(mft_attribute=1, mft_entry=41, parent=self._qcow_path_spec) file_entry = self._file_system.GetFileEntryByPathSpec(path_spec) fsntfs_attribute = file_entry._fsntfs_file_entry.get_attribute(0) ntfs_attribute = ntfs_file_entry.StandardInformationNTFSAttribute( fsntfs_attribute) self.assertEqual(ntfs_attribute.attribute_type, 0x00000010)
def testAttributeType(self): """Test the attribute_type property.""" path_spec = path_spec_factory.Factory.NewPathSpec( definitions.TYPE_INDICATOR_NTFS, mft_attribute=1, mft_entry=41, parent=self._qcow_path_spec) file_entry = self._file_system.GetFileEntryByPathSpec(path_spec) fsntfs_attribute = file_entry._fsntfs_file_entry.get_attribute(0) ntfs_attribute = ntfs_file_entry.StandardInformationNTFSAttribute( fsntfs_attribute) self.assertEqual(ntfs_attribute.attribute_type, 0x00000010)