def test_matchesHostIP(self): """ A "hostname,ip" formatted line will match both the host and the IP. """ self.entry = PlainEntry.fromString(self.hostIPLine) self.assertEqual(True, self.entry.matchesHost("198.49.126.131")) self.test_matchesHost()
def test_toString(self): """ L{PlainEntry.toString} generates the serialized OpenSSL format string for the entry, sans newline. """ self.assertEqual(self.entry.toString(), self.plaintextLine.rstrip("\n")) multiHostEntry = PlainEntry.fromString(self.hostIPLine) self.assertEqual(multiHostEntry.toString(), self.hostIPLine.rstrip("\n"))
def setUp(self): """ Set 'entry' to a sample plain-text entry with sampleKey as its key. """ self.entry = PlainEntry.fromString(self.plaintextLine)