self.assertEqual(parent_cover_changed.call_count, 0)
# Now change cover in parent.
parent_cover_changed.reset_mock()
self.parent.cover_url = "http://example.com/other-cover.jpg"
self.assertEqual(parent_cover_changed.call_count, 0)
# Now change cover in parent.
parent_cover_changed.reset_mock()
self.parent.cover_url = "http://example.com/other-cover.jpg"
parent_cover_changed.assert_called_with(child)
@patch.object(Book, 'parent_cover_changed', autospec=True)
parent_cover_changed.assert_called_with(child)
@patch.object(Book, 'parent_cover_changed', autospec=True)
# Now import child and reimport parent.
child = Book.from_text_and_meta(ContentFile(self.TEXT), self.child)
self.parent.parts = parts
# Now import child and reimport parent.
child = Book.from_text_and_meta(ContentFile(self.TEXT), self.child)
self.parent.parts = parts