'Checks if the details include certain attributes.
Instead of using a (fragile) regression test, we enumerate important
attributes here and make sure they are returned.'

def testResultIncludesDetails(self):

    args = vfs_plugin.ApiGetFileDetailsArgs(client_id=self.client_id, file_path=self.file_path)
    result = self.handler.Handle(args, token=self.token)
    attributes_by_type = {}
    attributes_by_type['AFF4MemoryStream'] = ['CONTENT']
    attributes_by_type['AFF4MemoryStreamBase'] = ['SIZE']
    attributes_by_type['AFF4Object'] = ['LAST', 'SUBJECT', 'TYPE']
    details = result.file.details
    for (type_name, attrs) in attributes_by_type.iteritems():
        type_obj = next((t for t in details.types if (t.name == type_name)))
        all_attrs = set([a.name for a in type_obj.attributes])
        self.assertTrue(set(attrs).issubset(all_attrs))
