Пример #1
0
 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()
Пример #2
0
 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()
Пример #3
0
 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"))
Пример #4
0
 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"))
Пример #5
0
 def setUp(self):
     """
     Set 'entry' to a sample plain-text entry with sampleKey as its key.
     """
     self.entry = PlainEntry.fromString(self.plaintextLine)
Пример #6
0
 def setUp(self):
     """
     Set 'entry' to a sample plain-text entry with sampleKey as its key.
     """
     self.entry = PlainEntry.fromString(self.plaintextLine)