Beispiel #1
0
 def test_apply_patch(self):
     patch = Document.from_string("foo", """<document><patch document="example"></patch></document>""").patches[0]
     docs = patch.apply({})
     assert len(docs.keys()) == 1
     assert docs.keys()[0] == 'example'
Beispiel #2
0
 def test_loading_document_from_string(self):
     doc = Document.from_string("foo", """<document></document>""")
     assert isinstance(doc, Document)