test_draft_view() fails

This test:

def test_draft_view(self):
    url = self.draft_post.get_absolute_url()
    req = self.client.get(url)
    self.assertEqual(req.status_code, 404)

fails - I'm getting a 200 rather than a 404:

FAIL: test_draft_view (blog.tests.test_views.BlogViewTests)

Traceback (most recent call last): File "/vagrant/microblog/blog/tests/test_views.py", line 44, in test_draft_view self.assertEqual(req.status_code, 404) AssertionError: 200 != 404

I can't find differences between my code and yourse, but I'm using django 1.5.1. Could that be the problem?

Sorry You must be a logged in, registered user to answer a question.

Answers

Django version shouldn't have an effect on this failing/succeeding. Check that your views and models match mine as well?