コード例 #1
0
 def test_parse_file(self):
     """Test NotaryParser.parse_file()"""
     from Perspectives import NotaryParser
     parser = NotaryParser()
     notaries = parser.parse_file(self.notary_file)
     self.assertIsNotNone(notaries)
     self.assertEqual(len(notaries), 4)
     for notary in notaries:
         self.assertIsNotNone(notary.hostname)
         self.assertIsNotNone(notary.port)
         self.assertIsNotNone(notary.public_key)
コード例 #2
0
ファイル: testutils.py プロジェクト: von/pyPerspectives
def test_notaries():
    """Return test Notaries"""
    from Perspectives import NotaryParser
    parser = NotaryParser()
    notaries = parser.parse_file(notary_file)
    return notaries