def METHOD_NAME(self, mock_imap):
    """Check potential conflicts."""
    core_factories.UserFactory(
        username="admin2@test.com", groups=("DomainAdmins", ),
        password="{PLAIN}toto"
    )
    domain = admin_models.Domain.objects.get(name="test.com")
    factories.EmailProviderDomainFactory(
        name="gmail.com", new_domain=domain)
    mock_imap.return_value.login.return_value = ["OK", b""]
    url = reverse("core:login")
    data = {"username": "admin@gmail.com", "password": "Toto1234"}
    response = self.client.post(url, data)
    self.assertEqual(response.status_code, 401)
    data = {"username": "admin2@gmail.com", "password": "Toto1234"}
    response = self.client.post(url, data)
    self.assertEqual(response.status_code, 401)