def test_xlist_surround_two_strings(self): xl = XList(['one', 'two', 'three'], {'first_attr': 1}) nl = xl.surround('<p>', '</p>') self.assertTrue('<p>one</p>' in nl) self.assertTrue('<p>two</p>' in nl) self.assertTrue('<p>three</p>' in nl)
def test_xlist_surround_one_string(self): xl = XList(['one', 'two', 'three'], {'first_attr': 1}) nl = xl.surround('"') self.assertTrue('"one"' in nl) self.assertTrue('"two"' in nl) self.assertTrue('"three"' in nl)