Thursday, September 1, 2011

Re: possible fix for auth test template

My apologies - please ignore my last email. I think I'm closer this time.

The test is still failing but for a different reason. In my fossicking
around I had adjusted the test expectation to 'Session accessed' and had
forgotten to reverse that prior to 'fixing' the problem.

I have now looked in django/contrib/auth/tests/urls.py and can see why
the empty template was used and how it should have reported 'Session not
accessed'

However, it is actually responding 'Session accessed' which tells me the
test is picking up a breakage somewhere.

Unfortunately, any deeper and I lose my way.

Mike


On 2/09/2011 1:52pm, Mike Dewhirst wrote:
> Django trunk revision 16715
>
> manage.py test is producing one failure out of 326 tests which might be
> due to an empty template. The test is asserting that response contains
> 'Session not accessed'
>
> With an empty template the assertion should succeed if it said the
> response does not contain something. But for it to assert it contains
> anything at all there should be at least something in the template.
>
> The template producing the error appears to be ...
>
> django/contrib/auth/tests/templates/context_processors/auth_attrs_no_access.html
>
>
> I copied the contents of ../auth_attrs_test_access.html into
> auth_attrs_no_access.html and the test passed. See diff below.
>
> Cheers
>
> Mike
>
>
> +++
> /django/contrib/auth/tests/templates/context_processors/auth_attrs_no_access.html
> Fri Sep 2 13:39:08 2011
> @@ -1 +1 @@
> -
> +{% if session_accessed %}Session accessed{% else %}Session not
> accessed{% endif %}

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

No comments:

Post a Comment