def test_user_with_no_security_level(self):
        component_tag = Tag.objects.create()
        component_tag_version = TagVersion.objects.create(
            tag=component_tag,
            type=self.component_type,
            elastic_index="component",
            security_level=None,
        )
        Component.from_obj(component_tag_version).save(refresh='true')

        with self.subTest('no security level'):
            res = self.client.get(self.url)
            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))

        for lvl in self.security_levels[1:]:
            with self.subTest(f'security level {lvl}'):
                component_tag_version.security_level = lvl
                component_tag_version.save()
                Component.from_obj(component_tag_version).save(refresh='true')

                res = self.client.get(self.url)
                self.assertEqual(res.status_code, status.HTTP_200_OK)
                self.assertEqual(len(res.data['hits']), 0)