Example #1
0
 def test_remove_raw(self):
     generator = HTMLChildGenerator()
     generator.extend_raw(["foo", "bar", "lower < than"])
     generator.remove_raw("foo")
     generator.remove_raw("lower < than")
     assert_equal([b"bar"], list(iter(generator)))
Example #2
0
 def test_extend_raw(self):
     generator = HTMLChildGenerator()
     generator.append(u"c1")
     generator.extend_raw([_TestingGenerator([u"c&2", u"c3"]), u"<c4>"])
     assert_equal([b"c1", b"c&2", b"c3", b"<c4>"], list(iter(generator)))