Esempio n. 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()
Esempio n. 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()
Esempio n. 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"))
Esempio 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"))
Esempio 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)
Esempio n. 6
0
 def setUp(self):
     """
     Set 'entry' to a sample plain-text entry with sampleKey as its key.
     """
     self.entry = PlainEntry.fromString(self.plaintextLine)