def testEmbedAddsUnnecessaryLinkWithDraft5(self):
        self.builder = Builder(self.uri, draft=drafts.DRAFT_5)
        target = self.make_target('first')

        self.builder.add_link('item', target, wrap=True)
        doc = Document.from_object(self.builder.as_object(),
                                   base_uri="http://localhost")
        urls_before_embed = [link.url() for link in doc.links['item']]

        self.builder.embed('item', target, wrap=True)
        doc = Document.from_object(self.builder.as_object(),
                                   base_uri="http://localhost")
        urls_after_embed = [link.url() for link in doc.links['item']]

        item_embeds = doc.embedded['item']
        embedded_urls = [embedded.url() for embedded in item_embeds]
        expected_urls = urls_before_embed - embedded_urls
        self.assertSequenceEqual(urls_after_embed, expected_urls)
dataset/ETHPy150Open wharris/dougrain/test/test_builder.py/EmbedBuilderTests.testEmbedAddsUnnecessaryLinkWithDraft5/operator `+` -> `-`