def METHOD_NAME(self):
    """Test Cached auth"""
    self.source.property_mappings.set(
        LDAPPropertyMapping.objects.filter(
            Q(managed__startswith="goauthentik.io/sources/ldap/default-")
            | Q(managed__startswith="goauthentik.io/sources/ldap/ms-")
        )
    )
    connection = MagicMock(return_value=mock_ad_connection(LDAP_PASSWORD))
    with patch("authentik.sources.ldap.models.LDAPSource.connection", connection):
        user_sync = UserLDAPSynchronizer(self.source)
        user_sync.sync_full()
        user = User.objects.get(username="user0_sn")
        auth_user_by_bind = Mock(return_value=user)
        with patch(
            "authentik.sources.ldap.auth.LDAPBackend.auth_user_by_bind",
            auth_user_by_bind,
        ):
            backend = LDAPBackend()
            self.assertEqual(
                backend.authenticate(None, username="user0_sn", password=LDAP_PASSWORD),
                user,
            )