Exemplo n.º 1
0
    def test_show_ip_route_2_with_vrf(self):
        self.maxDiff = None
        self.device = Mock(**self.golden_output_2_with_vrf)
        obj = ShowIpRoute(device=self.device)

        parsed_output = obj.parse(vrf='VRF1')
        self.assertEqual(parsed_output, self.golden_parsed_output_2_with_vrf)
Exemplo n.º 2
0
 def test_show_ip_route_with_route(self):
     self.maxDiff = None
     self.device = Mock(**self.golden_output_with_route)
     obj = ShowIpRoute(device=self.device)
     parsed_output = obj.parse(route='201.4.8.0')
     self.assertEqual(parsed_output, self.golden_parsed_output_with_route)
Exemplo n.º 3
0
 def test_empty_1(self):
     self.device = Mock(**self.empty_output)
     obj = ShowIpRoute(device=self.device)
     with self.assertRaises(SchemaEmptyParserError):
         parsed_output = obj.parse(route='201.4.8.0')
Exemplo n.º 4
0
 def test_show_ip_route_1(self):
     self.maxDiff = None
     self.device = Mock(**self.golden_output_1)
     obj = ShowIpRoute(device=self.device)
     parsed_output = obj.parse()
     self.assertEqual(parsed_output, self.golden_parsed_output_1)