Example #1
0
 def test_golden_4(self):
     self.device = Mock(**self.golden_output_4)
     obj = Ping(device=self.device)
     parsed_output = obj.parse(addr='10.4.1.1',
                               source='10.4.1.2',
                               size=1400)
     self.assertEqual(parsed_output, self.golden_parsed_output_4)
Example #2
0
 def test_golden_3(self):
     self.device = Mock(**self.golden_output_3)
     obj = Ping(device=self.device)
     parsed_output = obj.parse(addr='10.135.0.2', count='10', ttl=5, wait=1)
     self.assertEqual(parsed_output, self.golden_parsed_output_3)
Example #3
0
 def test_golden(self):
     self.device = Mock(**self.golden_output)
     obj = Ping(device=self.device)
     parsed_output = obj.parse(addr='10.189.5.94', count='5')
     self.assertEqual(parsed_output, self.golden_parsed_output)
Example #4
0
 def test_golden_2(self):
     self.device = Mock(**self.golden_output_2)
     obj = Ping(device=self.device)
     parsed_output = obj.parse(addr='2001:db8:223c:2c16::2', count='10')
     self.assertEqual(parsed_output, self.golden_parsed_output_2)
Example #5
0
 def test_empty(self):
     self.device = Mock(**self.empty_output)
     obj = Ping(device=self.device)
     with self.assertRaises(SchemaEmptyParserError):
         obj.parse(addr='10.189.5.94', count='5')