Exemple #1
0
 def test_get_remote_hosts_sets_hosts(self):
     subject = Component()
     nic = Component()
     the_object = Component()
     the_object.state.set_flag("IS_NETWORK_HOST")
     subject.register_component(nic)
     nic.establish_duplex(the_object)
     subject.execute_behavior(network.GetNetworkHosts)
     self.assertEqual(len(subject.state.available_hosts), 1)
     self.assertIn(subject.state.available_hosts, the_object)
Exemple #2
0
 def test_get_remote_hosts_sets_empty_list(self):
     subject = Component()
     subject.execute_behavior(network.GetNetworkHosts)
     self.assertEqual(subject.state.available_hosts, [])