def METHOD_NAME(self):
    domain = get(
        Domain, project=self.subproject, domain="test.example.com", canonical=False
    )
    self.assertEqual(domain.canonical, False)
    resp = self.client.post(
        reverse("projects_domains_edit", args=[self.subproject.slug, domain.pk]),
        data={"canonical": True},
    )
    self.assertEqual(resp.status_code, 401)
    self.assertEqual(self.subproject.domains.count(), 1)
    domain = self.subproject.domains.first()
    self.assertEqual(domain.domain, "test.example.com")
    self.assertEqual(domain.canonical, False)