def test_can_edit_not(self): """ A story can only be edited by the person who created it (or a member of staff). The craft fair story was created by an anonymous user. """ story = get_story_craft_fair() self.assertFalse(story.user_can_edit(get_user_web()))
def test_remove_perm(self): story = get_story_craft_fair() self.assert_logged_in( reverse('story.remove', kwargs={'pk': story.pk}) )
def test_publish_perm(self): story = get_story_craft_fair() self.assert_logged_in( reverse('story.publish', kwargs={'pk': story.pk}) )
def test_removed_not(self): story = get_story_craft_fair() self.assertFalse(get_story_craft_fair().removed)
def test_removed(self): story = get_story_craft_fair() story.set_removed(get_user_staff()) story.save() self.assertTrue(get_story_craft_fair().removed)
def test_published_not(self): story = get_story_craft_fair() self.assertFalse(get_story_craft_fair().published)
def test_published(self): story = get_story_craft_fair() story.set_published(get_user_staff()) story.save() self.assertTrue(get_story_craft_fair().published)
def test_remove_perm(self): story = get_story_craft_fair() self.assert_logged_in(reverse('story.remove', kwargs={'pk': story.pk}))
def test_publish_perm(self): story = get_story_craft_fair() self.assert_logged_in(reverse('story.publish', kwargs={'pk': story.pk}))