def test_set_title_without_title_provided_but_with_header(self): header = Header('title') content = Content(header=header) Image._set_content(self.image_mock, content) Image._set_title(self.image_mock, '') self.assertEqual(self.image_mock.title, 'title')
def test_set_title_default_behavior(self): self.image_mock.content.header = None Image._set_title(self.image_mock, None) self.assertEqual(self.image_mock.title, '')
def test_set_title_with_title_provided(self): Image._set_title(self.image_mock, 'foo') self.assertEqual(self.image_mock.title, 'foo')