def METHOD_NAME(self):
    section = self.doc_structure.add_new_section('mysection')
    section.writeln('section contents')
    self.doc_structure.hrefs['foo'] = 'www.foo.com'
    section.hrefs['bar'] = 'www.bar.com'
    contents = self.doc_structure.flush_structure()
    self.assertIn(b'.. _foo: www.foo.com', contents)
    self.assertIn(b'.. _bar: www.bar.com', contents)