def test_activation_deactivated(self):
        new_user = RegistrationProfile.objects.create_inactive_user(
            site=Site.objects.get_current(), **self.user_info)
        profile = RegistrationProfile.objects.get(user=new_user)
        RegistrationProfile.objects.activate_user(profile.activation_key)

        # Deactivate the new user.
        new_user.is_active = False
        new_user.save()

        # Try to activate again and ensure False is returned.
        failed = RegistrationProfile.objects.activate_user(profile.activation_key)
        self.assertFalse(failed)
Add an issue comment to one of your repositories.
dataset/ETHPy150Open macropin/django-registration/registration/tests/models.py/RegistrationModelTests.test_activation_deactivated--crossover with--dataset/ETHPy150Open Sheeprider/BitBucket-api/bitbucket/issue_comment.py/IssueComment.create