I have a test which succeeds in development but fails with Apache in
staging ...
Here is the test ...
def test_course_view_not_found_status_code(self):
# no course exists with pk of 99
response = self.client.get(reverse('course:course_view',
kwargs={'pk': 99}))
self.assertEquals(response.status_code, 404)
The status code from the staging server with Apache is 301 <-- Huh?
The test class tearDown() deletes all courses between each test.
Here is the view ...
def course_view(request, pk=None):
course = get_object_or_404(Course, pk=pk)
# login is needed if there are questions/answers
if course.login_needed or request.user.is_authenticated:
return course_login_required(request, course=course)
else:
return course_login_not_required(request, course=course)
What am I doing wrong?
Thanks
Mike
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/dff00ca5-ef30-85ed-dc6a-96d06db988d9%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.