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)
def test_notaries(): """Return test Notaries""" from Perspectives import NotaryParser parser = NotaryParser() notaries = parser.parse_file(notary_file) return notaries