

def testFirstEmbedWrapped(self):
    target = self.make_target('first')
    target.builder.embed('item', target, wrap=True)
    doc = Document.from_object(self.builder.as_object(), base_uri='http://localhost')
    self.assertIsInstance(self.builder.as_object()['_embedded']['item'], list)
    item_embeds = doc.embedded['item']
    names = [embedded.properties['name'] for embedded in item_embeds]
    self.assertEquals(names, ['first'])

dataset/ETHPy150Open wharris/dougrain/test/test_builder.py EmbedBuilderTests.testFirstEmbedWrapped/VarMisuse@19/27 `self`->`target`