def METHOD_NAME(self):
    """Try to set limits for a given domain."""
    domain = Domain.objects.get(name="test.com")
    values = {
        "name": domain.name, "quota": domain.quota,
        "default_mailbox_quota": domain.default_mailbox_quota,
        "enabled": domain.enabled, "type": "domain",
        "mailboxes_limit": 3, "mailbox_aliases_limit": 3,
        "domain_aliases_limit": 3, "domain_admins_limit": 3
    }
    self.ajax_post(
        reverse("admin:domain_change", args=[domain.id]),
        values
    )
    domain.refresh_from_db()
    self.assertEqual(
        domain.domainobjectlimit_set.get(name="mailboxes").max_value, 3)
    self.assertEqual(
        domain.domainobjectlimit_set.get(
            name="mailbox_aliases").max_value, 3)
    self.assertEqual(
        domain.domainobjectlimit_set.get(
            name="domain_aliases").max_value, 3)
    self.assertEqual(
        domain.domainobjectlimit_set.get(
            name="domain_admins").max_value, 3)