def test_filter_on_component_agent(self):
        agent = self.create_agent()

        component_tag = Tag.objects.create()
        component_tag_version = TagVersion.objects.create(
            tag=component_tag,
            type=self.component_type,
            elastic_index="component",
        )

        structure_type = StructureType.objects.create()
        structure_template = Structure.objects.create(type=structure_type, is_template=True)

        archive_tag = Tag.objects.create()
        archive_tag_version = TagVersion.objects.create(
            tag=archive_tag,
            type=self.archive_type,
            elastic_index="archive",
        )
        structure, archive_tag_structure = structure_template.create_template_instance(archive_tag)
        Archive.from_obj(archive_tag_version).save(refresh='true')

        TagStructure.objects.create(tag=component_tag, parent=archive_tag_structure, structure=structure)

        AgentTagLink.objects.create(
            agent=agent,
            tag=component_tag_version,
            type=AgentTagLinkRelationType.objects.create(),
        )
        Component.from_obj(component_tag_version).save(refresh='true')

        res = self.client.get(self.url, {'agents': str(agent.pk)})
        self.assertEqual(res.status_code, status.HTTP_200_OK)
        self.assertEqual(len(res.data['hits']), 1)
        self.assertEqual(res.data['hits'][0]['_id'], str(component_tag_version.pk))