

def testAlreadyHasSelfLink(self):
    doc = Document.from_object(self.builder.as_object(), base_uri='http://localhost')
    self_link.assertIn('self', doc.links)
    self_link = doc.links['self']
    self.assertEqual(self_link.url(), self.uri)
    self.assertEqual(doc.url(), self.uri)
    self.assertEqual(doc.links.keys(), ['self'])

dataset/ETHPy150Open wharris/dougrain/test/test_builder.py InitialBuilderTests.testAlreadyHasSelfLink/VarMisuse@29/41 `self`->`self_link`