def METHOD_NAME(self):
    """api respects disabled users visibility"""
    disabled_user = create_test_user(
        "DisabledUser", "disableduser@example.com", is_active=False
    )
    response = self.client.get("%s?q=DisabledUser" % self.api_link)
    self.assertEqual(response.status_code, 200)
    response_json = response.json()
    self.assertIn("users", [p["id"] for p in response_json])
    for provider in response_json:
        if provider["id"] == "users":
            self.assertEqual(provider["results"]["results"], [])
    # user shows in search performed by staff
    self.user.is_staff = True
    self.user.save()
    response = self.client.get("%s?q=DisabledUser" % self.api_link)
    self.assertEqual(response.status_code, 200)
    response_json = response.json()
    self.assertIn("users", [p["id"] for p in response_json])
    for provider in response_json:
        if provider["id"] == "users":
            results = provider["results"]["results"]
            self.assertEqual(len(results), 1)
            self.assertEqual(results[0]["id"], disabled_user.id)