示例#1
0
    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"))
示例#2
0
    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"))
示例#3
0
    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'))