예제 #1
0
    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()
예제 #2
0
 def test_get_title_without_item_no(self):
     item = Item(title="test_title")
     self.assertEqual(item.get_title(), "test_title")
예제 #3
0
    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")