Exemple #1
0
 def test_path_for_employee1_should_end_with_foo_gw(self):
     path = l2trace.get_path('10.0.20.10')
     self.assertEqual(path[-1].host, self.foo_gw)
Exemple #2
0
 def test_path_for_employee1_should_be_on_vlan_20(self):
     path = l2trace.get_path('10.0.20.10')
     self.assertEqual(path[0].vlan.vlan, 20)
     self.assertEqual(path[1].vlan.vlan, 20)
Exemple #3
0
 def test_path_for_employee1_should_start_with_employee_1(self):
     path = l2trace.get_path('10.0.20.10')
     self.assertTrue(isinstance(path[0].host, l2trace.Host))
Exemple #4
0
 def test_path_for_employee2_should_be_3_long(self):
     path = l2trace.get_path('10.0.20.90')
     self.assertEqual(len(path), 3, path)
Exemple #5
0
 def test_path_for_foo_sw1_should_be_on_vlan_10(self):
     path = l2trace.get_path(self.foo_sw1.ip)
     self.assertEqual(path[0].vlan.vlan, 10)
     self.assertEqual(path[1].vlan.vlan, 10)
Exemple #6
0
 def test_path_for_foo_sw1_should_end_at_foo_gw(self):
     path = l2trace.get_path(self.foo_sw1.ip)
     self.assertEqual(path[-1].host, self.foo_gw)
Exemple #7
0
 def test_path_for_foo_sw1_should_start_with_foo_sw1(self):
     path = l2trace.get_path(self.foo_sw1.ip)
     self.assertEqual(path[0].host, self.foo_sw1)
Exemple #8
0
 def test_path_for_foo_sw1_should_be_2_long(self):
     path = l2trace.get_path(self.foo_sw1.ip)
     self.assertEqual(len(path), 2)