1. Carl Meyer
  2. django-localeurl
Issue #11 resolved

localeurl tests fail django-registration tests

Anonymous created an issue

Localeurl 1.4 fails django-registration (0.8 tip) tests. Without localeurl tests, django-registration tests pass fine.

{{{

!python

====================================================================== ERROR: test_registration_view_success (registration.tests.views.RegistrationViewTests)


Traceback (most recent call last): File "/workspace/foobar/ext/registration/tests/views.py", line 58, in test_registration_view_success response = self.client.post(reverse('registration_register'), File "/workspace/foobar/ext/localeurl/models.py", line 10, in reverse url = django_reverse(*args, kwargs) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 350, in reverse *args, kwargs))) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 271, in reverse possibilities = self.reverse_dict.getlist(lookup_view) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 193, in _get_reverse_dict self._populate() File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 186, in _populate lookups.appendlist(pattern.name, (bits, p_pattern)) AttributeError: 'RegexURLResolver' object has no attribute 'name'

====================================================================== ERROR: test_valid_activation (registration.tests.views.RegistrationViewTests)


Traceback (most recent call last): File "/workspace/foobar/ext/registration/tests/views.py", line 168, in test_valid_activation success_redirect = 'http://testserver%s' % reverse('registration_activation_complete') File "/workspace/foobar/ext/localeurl/models.py", line 10, in reverse url = django_reverse(*args, kwargs) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 350, in reverse *args, kwargs))) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 271, in reverse possibilities = self.reverse_dict.getlist(lookup_view) File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 193, in _get_reverse_dict self._populate() File "/usr/local/lib/python2.6/dist-packages/django/core/urlresolvers.py", line 186, in _populate lookups.appendlist(pattern.name, (bits, p_pattern)) AttributeError: 'RegexURLResolver' object has no attribute 'name'

}}}

Comments (2)

  1. Carl Meyer repo owner
    • changed status to open

    Considering localeurl has to monkeypatch the url reversing system in order to work, it's not too surprising that it might break tests in other apps. However, ideally it wouldn't; I'll take a look at what's happening here.

  2. Log in to comment