def test_get_title_invalid_related(self, content_object): item = Item(title="test_title") content_object.get_agenda_title.return_value = "related_title" del content_object.get_agenda_title with self.assertRaises(NotImplementedError): item.get_title()
def test_get_title_without_item_no(self): item = Item(title="test_title") self.assertEqual(item.get_title(), "test_title")
def test_get_title_from_related(self, content_object): item = Item(title="test_title") content_object.get_agenda_title.return_value = "related_title" self.assertEqual(item.get_title(), "related_title")