def test_registration_disallowed_url(self):
        """
        Passing ``disallowed_url`` to the ``register`` view will
        result in a redirect to that URL when registration is closed.

        """
        old_allowed = getattr(settings, 'REGISTRATION_OPEN', True)
        settings.REGISTRATION_OPEN = False

        closed_redirect = reverse('registration_test_custom_disallowed') % 'http://testserver%s'

        response = self.client.get(reverse('registration_test_register_disallowed_url'))
        self.assertRedirects(response, closed_redirect)

        settings.REGISTRATION_OPEN = old_allowed
dataset/ETHPy150Open nathanborror/django-registration/registration/tests/views.py/RegistrationViewTests.test_registration_disallowed_url/swapped operands of `%`