Beispiel #1
0
 def test_noparsepeer(self):
     """
     Ensure the result of parsed noise lines is empty
     """
     parsed = NTPPeers.parse(noiselines)
     empty = NTPPeers.newpeerdict()
     self.assertEqual(parsed, empty)
Beispiel #2
0
 def test_noparsepeer(self):
     """
     Ensure the result of parsed noise lines is empty
     """
     parsed = NTPPeers.parse(noiselines)
     empty = NTPPeers.newpeerdict()
     self.assertEqual(parsed, empty)
Beispiel #3
0
 def test_noparsestratum99(self):
     empty = NTPPeers.newpeerdict()
     parsed = NTPPeers.parse(' 1234 5678 99 u 8 128 377 31.430  -16.143  74.185')
     self.assertEqual(parsed, empty)
Beispiel #4
0
 def test_parsepeer(self):
     parsed = NTPPeers.parse(alllines)
     self.assertEqual(parsed, parsedpeers)
Beispiel #5
0
 def test_parsetestdata(self):
     """Ensure the test data matches the expected number of valid peers."""
     for t in testdata:
         parsed = NTPPeers.parse(t)
         self.assertEqual(len(parsed['all']['address']), testdata[t])
Beispiel #6
0
 def test_parsepeer(self):
     """Ensure the parsed peer lines matches the expected values."""
     parsed = NTPPeers.parse(alllines)
     self.assertEqual(parsed, parsedpeers)
Beispiel #7
0
 def test_noparsestratum99(self):
     """Ensure the result of parsed incorrect peer line is empty."""
     empty = NTPPeers.newpeerdict()
     parsed = NTPPeers.parse(
         ' 1234 5678 99 u 8 128 377 31.430  -16.143  74.185')
     self.assertEqual(parsed, empty)
Beispiel #8
0
 def test_noparsestratum99(self):
     empty = NTPPeers.newpeerdict()
     parsed = NTPPeers.parse(
         ' 1234 5678 99 u 8 128 377 31.430  -16.143  74.185')
     self.assertEqual(parsed, empty)
Beispiel #9
0
 def test_parsepeer(self):
     parsed = NTPPeers.parse(alllines)
     self.assertEqual(parsed, parsedpeers)
Beispiel #10
0
 def test_parsetestdata(self):
     """Ensure the test data matches the expected number of valid peers."""
     for t in testdata:
         parsed = NTPPeers.parse(t)
         self.assertEqual(len(parsed['all']['address']), testdata[t])
Beispiel #11
0
 def test_parsepeer(self):
     """Ensure the parsed peer lines matches the expected values."""
     parsed = NTPPeers.parse(alllines)
     self.assertEqual(parsed, parsedpeers)
Beispiel #12
0
 def test_noparsestratum99(self):
     """Ensure the result of parsed incorrect peer line is empty."""
     empty = NTPPeers.newpeerdict()
     parsed = NTPPeers.parse(' 1234 5678 99 u 8 128 377 31.430  -16.143  74.185')
     self.assertEqual(parsed, empty)