def setUp(self): self.story = StoryFactory()
def test_story_returns_404_if_unpublished(self): story = StoryFactory(status='d') resp = self.client.get(story.get_absolute_url()) self.assertEqual(resp.status_code, 404)
def setUp(self): self.story = StoryFactory()
def test_story_returns_404_if_unpublished(self): story = StoryFactory(status='d') resp = self.client.get(story.get_absolute_url()) self.assertEqual(resp.status_code, 404)