@mock_ec2_deprecated
@mock_elb_deprecated
def test_deregister_instances_valid_id_list(self):
    '\n        tests that given an valid ids in the form of a list that the boto_elb\n        deregister_instances all members of the given list\n        '
    conn_ec2 = boto.ec2.connect_to_region(region, **boto_conn_parameters)
    conn_elb = boto.ec2.elb.connect_to_region(region, **boto_conn_parameters)
    zones = [zone.name for zone in conn_ec2.get_all_zones()]
    elb_name = 'TestDeregisterInstancesValidIdList'
    load_balancer = conn_elb.create_load_balancer(elb_name, zones, [(80, 80, 'http')])
    reservations = conn_ec2.run_instances('ami-08389d60', min_count=3)
    all_instance_ids = [instance.id for instance in reservations.instances]
    load_balancer.register_instances(all_instance_ids)
    deregister_instances = [instance.id for instance in reservations.instances[:(- 1)]]
    expected_instances = [reservations.instances[(- 1)].id]
    boto_elb.deregister_instances(elb_name, deregister_instances, **conn_parameters)
    load_balancer_refreshed = conn_elb.get_all_load_balancers(elb_name)[0]
    actual_instances = [instance.id for instance in load_balancer_refreshed.instances]
    self.assertEqual(actual_instances, expected_instances)
tests that given an valid ids in the form of a list that the boto_elb
deregister_instances all members of the given list
@mock_ec2_deprecated
@mock_elb_deprecated
def test_deregister_instances_valid_id_list(self):
    '\n        tests that given an valid ids in the form of a list that the boto_elb\n        deregister_instances all members of the given list\n        '
    conn_ec2 = boto.ec2.connect_to_region(region, **boto_conn_parameters)
    conn_elb = boto.ec2.elb.connect_to_region(region, **boto_conn_parameters)
    zones = [zone.name for zone in conn_ec2.get_all_zones()]
    elb_name = 'TestDeregisterInstancesValidIdList'
    load_balancer = conn_elb.create_load_balancer(elb_name, zones, [(80, 80, 'http')])
    reservations = conn_ec2.run_instances('ami-08389d60', min_count=3)
    all_instance_ids = [instance.id for instance in reservations.instances]
    load_balancer.register_instances(all_instance_ids)
    deregister_instances = [instance.id for instance in reservations.instances[:(- 1)]]
    expected_instances = [reservations.instances[(- 1)].id]
    boto_elb.deregister_instances(elb_name, deregister_instances, **conn_parameters)
    load_balancer_refreshed = conn_elb.get_all_load_balancers(elb_name)[0]
    actual_instances = [instance.id for instance in load_balancer_refreshed.instances]
    self.assertEqual(actual_instances, expected_instances)