I am having trouble using django's test facility. I have written a unit test (copied from the example on the website):
# Issue a GET request response = self.client.get('/archive/') # Check that the respose is 200 OK self.failUnlessEqual(response.status_code, 200) This test fails with a status code 404 The full code is below my sig. However, this page does render for me, and when I perform the same command from the shell, the response code is 200 as expected. >>> from django.test.client import Client >>> client = Client() >>> response = client.get('/archive/') >>> response.status_code 200 >>> What am I doing wrong? Thanks, Ryan Ginstrom """Unit tests for archive unit""" import unittest from django.test.client import Client class ArchiveTest(unittest.TestCase): def setUp(self): # Every test needs a client self.client = Client() def test_index(self): # Issue a GET request response = self.client.get('/archive/') # Check that the respose is 200 OK self.failUnlessEqual(response.status_code, 200) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---