コード例 #1
0
 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
コード例 #2
0
ファイル: test_pull_doc.py プロジェクト: tommycarpi/py-tracy
 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