def test_update_merge(self): metadata = ExtractedMetadata(summary="summary") metadata2 = ExtractedMetadata(description="description") metadata.update(metadata2) self.assertThat(metadata.get_summary(), Equals("summary")) self.assertThat(metadata.get_description(), Equals("description"))
def test_update_overwrite(self): metadata = ExtractedMetadata(summary="summary", description="description") metadata2 = ExtractedMetadata(description="new description") metadata.update(metadata2) self.assertThat(metadata.get_summary(), Equals("summary")) self.assertThat(metadata.get_description(), Equals("new description"))
def test_update_merge(self): metadata = ExtractedMetadata(summary='summary') metadata2 = ExtractedMetadata(description='description') metadata.update(metadata2) self.assertThat(metadata.get_summary(), Equals('summary')) self.assertThat(metadata.get_description(), Equals('description'))