def test_create_then_parse(self): sample = self._sample_doc() msg = Protocol("1.0").create("PUSH-DOC", sample) copy = document.Document() msg.push_to_document(copy) assert len(sample.roots) == 2 assert len(copy.roots) == 2
def test_create_reply_then_parse(self): sample = self._sample_doc() msg = Protocol("1.0").create("PULL-DOC-REPLY", 'fakereqid', sample) copy = document.Document() msg.push_to_document(copy) assert len(sample.roots) == 2 assert len(copy.roots) == 2