def test_specialReplace_elUpdateNonemptyFields_allFieldsReplaced(self): movie = Movie(1, 'Frozen', 'Ice queen with magical powers', 'Animation') self.__movieUpdate = Movie(1, 'Frozen 2', 'Story about sisters', 'Family') movie.special_replace(self.__movieUpdate) self.assertTrue(self.__movieUpdate.identical(movie))
def test_specialReplace_elUpdate1EmptyField_1remainsUnchanged(self): movie = Movie(1, 'Frozen', 'Ice queen with magical powers', 'Animation') self.__movieUpdate_emptyField = Movie(1, 'Frozen 3', '', 'Family') movie.special_replace(self.__movieUpdate_emptyField) self.assertEqual(movie.get_title(), 'Frozen 3') self.assertEqual(movie.get_description(), 'Ice queen with magical powers') self.assertEqual(movie.get_genre(), 'Family')