def test_items_can_have_strings_and_components_in_the_same_list(self):
     ol = OrderedList()
     ol.add_component(ComponentHtml('li', 'x'))
     ol.add_component('y')
     self.assertEquals('<ol><li>x</li><li>y</li></ol>', ol.as_html())
 def test_create_a_list_with_two_items(self):
     ol = OrderedList()
     ol.add_component('x')
     ol.add_component('y')
     self.assertEquals('<ol><li>x</li><li>y</li></ol>', ol.as_html())
 def test_items_can_be_components_too(self):
     ol = OrderedList()
     ol.add_component(ComponentHtml('li', 'x'))
     ol.add_component(ComponentHtml('li', 'y'))
     self.assertEquals('<ol><li>x</li><li>y</li></ol>', ol.as_html())
 def test_create_an_empty_list(self):
     ol = OrderedList()
     self.assertEquals('<ol></ol>', ol.as_html())