Ejemplo n.º 1
0
 def test_filternoiselines(self):
     """Compare the output of alllines filtered by isnoiseline() with the known non-noise lines."""
     nonNoiseLines = [
         x for x in alllines.split('\n') if not NTPPeers.isnoiseline(x)
     ]
     self.assertEqual(nonNoiseLines,
                      inactivepeerlines.split('\n') + peerlines.split('\n'))
Ejemplo n.º 2
0
 def test_filternoiselines(self):
     """
     Compare the output of alllines filtered by isnoiseline() with the known non-noise lines.
     """
     nonNoiseLines = [x for x in alllines.split('\n') if not NTPPeers.isnoiseline(x)]
     self.assertEqual(nonNoiseLines, peerlines.split('\n'))
Ejemplo n.º 3
0
 def test_isntnoiseline(self):
     for s in peerlines.split('\n'):
         self.assertFalse(NTPPeers.isnoiseline(s))
Ejemplo n.º 4
0
 def test_isnoiseline(self):
     for s in noiselines.split('\n'):
         self.assertTrue(NTPPeers.isnoiseline(s))
Ejemplo n.º 5
0
 def test_peerisntnoise(self):
     """Ensure valid peer lines aren't classified as noise."""
     for s in peerlines.split('\n'):
         self.assertFalse(NTPPeers.isnoiseline(s))
Ejemplo n.º 6
0
 def test_isnoiseline(self):
     """Ensure noise lines are classified as such."""
     for s in noiselines.split('\n'):
         self.assertTrue(NTPPeers.isnoiseline(s))
Ejemplo n.º 7
0
 def test_isntnoiseline(self):
     for s in peerlines.split('\n'):
         self.assertFalse(NTPPeers.isnoiseline(s))
Ejemplo n.º 8
0
 def test_isnoiseline(self):
     for s in noiselines.split('\n'):
         self.assertTrue(NTPPeers.isnoiseline(s))
Ejemplo n.º 9
0
 def test_peerisntnoise(self):
     """Ensure valid peer lines aren't classified as noise."""
     for s in peerlines.split('\n'):
         self.assertFalse(NTPPeers.isnoiseline(s))
Ejemplo n.º 10
0
 def test_isnoiseline(self):
     """Ensure noise lines are classified as such."""
     for s in noiselines.split('\n'):
         self.assertTrue(NTPPeers.isnoiseline(s))