def test_default_when_nothing(self): ip_port = broker._resolve_ip_port() self.compare_to_fixture(ip_port, self.fixture_default_nao_local_robot, 'We expect the nao.local/9559 robot.')
def test_default_params_favorite(self): ip_port = broker._resolve_ip_port() self.compare_to_fixture(ip_port, self.fixture_favorite_robot, 'We expect the favorite robot.')
def test_id_ip_addr(self): myFix = self.fixture_unusual_port_robot ip_port = broker._resolve_ip_port(nao_id=myFix['ip_address']) self.compare_to_fixture(ip_port, myFix, 'In testing with ip address.')
def test_id_robot_name(self): myFix = self.fixture_first_robot ip_port = broker._resolve_ip_port(nao_id=myFix['robot_name']) self.compare_to_fixture(ip_port, myFix, 'In testing with robot name.')
def test_unknown_id(self): ip_port = broker._resolve_ip_port(nao_id='unknown') self.compare_to_fixture(ip_port, self.fixture_unknown_robot, 'We expect the unknown/9559 robot.')
def test_unusual_port_forcing_port(self): myFix = self.fixture_nao_local_fake_port_robot ip_port = broker._resolve_ip_port(nao_id=myFix['host_name'], nao_port=myFix['naoqi_port']) self.compare_to_fixture(ip_port, myFix, 'In test forcing the port.')
def test_unusual_port_with_id_and_port(self): myFix = self.fixture_unusual_port_robot ip_port = broker._resolve_ip_port(nao_id=myFix['host_name'], nao_port=myFix['naoqi_port']) self.compare_to_fixture(ip_port, myFix, 'In test with nao_id and nao_port.')
def test_unusual_port_with_id(self): myFix = self.fixture_unusual_port_robot ip_port = broker._resolve_ip_port(nao_id=myFix['host_name']) self.compare_to_fixture(ip_port, myFix, 'In test with only nao_id.')
def test_default_params_local(self): ip_port = broker._resolve_ip_port() self.compare_to_fixture(ip_port, self.fixture_local_robot, 'We expect the local robot.')