List Info

Thread: Tests fail on redirects when admin urls enabled




Tests fail on redirects when admin urls enabled
user name
2007-06-25 20:49:10
I recently enabled the admin module on a project I am working on, and some (formerly) passing tests began erroring when testing redirects. Here is the exception traceback from a failing test:


Traceback (most recent call last):
  File "E:devseosrcseosmtests.py", line 135, in test_seeking_CitiesRedirect
    response = self.client.get('/singles/New York/New York/')
  File "e:devdjangodjangotestclient.py", line 200, in get
    return self.request(**r)
  File "e:devdjangodjangocorehandlersbase.py", line 77, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "E:devseosrcseosmviews.py", line 170, in seeking
  ;  'seek_slug': seek_name}))
  File "e:devdjangodjangocoreurlresolvers.py", line 282, in reverse
    return '/'; + get_resolver(urlconf).reverse(viewname, *args, **kwargs)
  File "e:devdjangodjangocoreurlresolvers.py", line 267, in reverse
  ;  if lookup_view in self.reverse_dict:
  File "e:devdjangodjangocoreurlresolvers.py", line 207, in _get_reverse_dict
    for key, value in pattern.reverse_dict.iteritems():
  File "e:devdjangodjangocoreurlresolvers.py", line 210, in _get_reverse_dict
    self._reverse_dict[pattern.callback] = (pattern,)
  File "e:devdjangodjangocoreurlresolvers.py", line 170, in _get_callback
    self._callback = get_callable(self._callback_str)
  File "e:devdjangodjangoutilsfunctional.py", line 16, in wrapper
  ;  result = func(*args)
  File "e:devdjangodjangocoreurlresolvers.py", line 44, in get_callable
    lookup_view = getattr(__import__(mod_name, {}, {}, ['';]), func_name)
  File "e:devdjangodjangocontribadminviewsdoc.py", line 291, in <module>
&nbsp; &nbsp; 'AutoField'&nbsp; &nbsp;   ; &nbsp; &nbsp; &nbsp; &nbsp;   : _('Integer'),
TypeError: 'str&#39; object is not callable



This is occurring wherever I test a redirect. If I comment out the admin line in urls.py , the errors disappear. I am on the latest development version to date (5541).

Any insight or help would be greatly appreciated! Thanks.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users"; group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to django-users-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Re: Tests fail on redirects when admin urls enabled
user name
2007-06-26 23:28:48
On 6/26/07, Rand Bradley <rand.bradleygmail.com> wrote:
> This is occurring wherever I test a redirect. If I
comment out the admin
> line in urls.py , the errors disappear. I am on the
latest development
> version to date (5541).
>
> Any insight or help would be greatly appreciated!
Thanks.

Looking at the traceback, it looks like you are having some
difficulty
in working up the reverse URL mapping - specifically,
something to do
with the documentation view in the admin. This could be
caused if
there is some metadata on a class that is causing the
automatically
generated admin views some difficulty, but it is difficult
to say
exactly what is causing the problem.

I would try manually walking through the admin pages
(especially the
documentation pages) in the admin view to see if you can
manually trip
the error. This will at least help you narrow down the
problem.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )