def test_panel_can_receive_strings_and_components(self): panel = Panel() panel.add_component('x') panel.add_component(Image('y')) self.assertEquals('<div>x<img src="y"/></div>', panel.as_html())
def test_panel_can_receive_strings(self): panel = Panel() panel.add_component('x') self.assertEquals('<div>x</div>', panel.as_html())
def test_panel_can_have_initial_content(self): panel = Panel('x') self.assertEquals('<div>x</div>', panel.as_html())
def test_panel_can_have_initial_content_as_a_component(self): panel = Panel(Image('y')) self.assertEquals('<div><img src="y"/></div>', panel.as_html())
def test_create_an_empty_panel(self): panel = Panel() self.assertEquals('<div></div>', panel.as_html())