def clean_user(self):
        user = self.cleaned_data['user']
        if user:
            try:
                user.groups.get(name=self.group.name)
            except Group.DoesNotExist:
                pass
            else:
                raise forms.ValidationError(_("User %(user)s is already a "
                    "member of %(group)s" %
                    {'user': user, 'group': self.group}))
        return user
Set up the XML Stream to have a SASL feature with the given mechanism.
dataset/ETHPy150Open lukaszb/django-projector/projector/forms.py/DashboardAddMemberForm.clean_user--crossover with--dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/words/test/test_jabbersasl.py/SASLInitiatingInitializerSetMechanismTest._setMechanism