def METHOD_NAME(self):
    search_url = reverse("wagtailadmin_pages:search")
    query = "Hello"
    base_css = "search--custom-class"
    icon = '<svg class="icon icon-custom filter-options__icon" aria-hidden="true"><use href="#icon-custom"></use></svg>'
    test_string = (
        '<a href="/customsearch/?q=%s" class="%s" is-custom="true">%sMy Search</a>'
    )
    # Testing the option link exists
    response = self.client.get(search_url, {"q": query})
    self.assertEqual(response.status_code, 200)
    self.assertTemplateUsed(response, "wagtailadmin/pages/search.html")
    self.assertTemplateUsed(response, "wagtailadmin/shared/search_area.html")
    self.assertTemplateUsed(response, "wagtailadmin/shared/search_other.html")
    self.assertContains(response, test_string % (query, base_css, icon), html=True)
    # Testing is_shown
    response = self.client.get(search_url, {"q": query, "hide-option": "true"})
    self.assertNotContains(
        response, test_string % (query, base_css, icon), status_code=200, html=True
    )
    # Testing is_active
    response = self.client.get(search_url, {"q": query, "active-option": "true"})
    self.assertContains(
        response,
        test_string % (query, base_css + " nolink", icon),
        status_code=200,
        html=True,
    )