def test_render_rst_with_type(self):
     node = Attribute(5, 'bar')
     node.type = 'str'
     rst = node.render_rst()
     self.assertEqual(rst, ['.. py:attribute:: bar',
                            '',
                            '   (str)',
                            ''])
 def test_render_rst_with_type_and_description(self):
     node = Attribute(5, 'bar')
     node.type = 'str'
     child = Node(indent=10, lines=["Description"], parent=node)
     node.add_child(child)
     rst = node.render_rst()
     self.assertEqual(rst, ['.. py:attribute:: bar',
                            '',
                            '   (str) Description',
                            ''])
 def test_set_type(self):
     node = Attribute(5, 'foo')
     node.type = 'str'
     self.assertEqual(node.type, 'str')