'Check that we can assign a nested protobuf.'

def testNestedProtobufAssignment(self):

    container = rdf_rekall_types.RekallRequest()
    pathspec = rdf_paths.PathSpec(path='\\\\.\\pmem', pathtype=1)
    self.assertRaises(ValueError, setattr, container, 'device', rdfvalue.RDFString('hello'))
    self.assertRaises(ValueError, setattr, container, 'device', rdf_client.StatEntry(st_size=5))
    container.device = pathspec
    self.assertEqual(container.device.path, '\\\\.\\pmem')
    container.device = None
    self.assertFalse(container.HasField('device'))
