def METHOD_NAME(self) -> None:
    self.login("desdemona")
    realm = get_realm("zulip")
    RealmDomain.objects.create(realm=realm, domain="acme.com")
    result = self.client_delete("/json/realm/domains/non-existent.com")
    self.assertEqual(result.status_code, 400)
    self.assert_json_error(result, "No entry found for domain non-existent.com.")
    result = self.client_delete("/json/realm/domains/acme.com")
    self.assert_json_success(result)
    self.assertFalse(RealmDomain.objects.filter(domain="acme.com").exists())
    self.assertTrue(realm.emails_restricted_to_domains)