Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(11)  |  Derive(0)  |  Import(0)

src/m/o/moto-HEAD/tests/test_ec2/test_tags.py   moto(Download)
    chain = itertools.chain.from_iterable
    existing_instances = list(chain([res.instances for res in conn.get_all_instances()]))
    existing_instances.should.have.length_of(1)
    existing_instance = existing_instances[0]
    existing_instance.tags["a key"].should.equal("some value")

src/m/o/moto-HEAD/tests/test_autoscaling/test_policies.py   moto(Download)
 
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(3)
 
 
 
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(5)
 
 
 
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(3)
 
 
 
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(3)
 

src/m/o/moto-HEAD/tests/test_autoscaling/test_autoscaling.py   moto(Download)
    group.desired_capacity.should.equal(2)
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(2)
 
    conn.set_desired_capacity("tester_group", 3)
    group = conn.get_all_groups()[0]
    group.desired_capacity.should.equal(3)
 
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(3)
    group.desired_capacity.should.equal(2)
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(2)
 
    conn.set_desired_capacity("tester_group", 1)
    group = conn.get_all_groups()[0]
    group.desired_capacity.should.equal(1)
 
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(1)
    group.desired_capacity.should.equal(2)
    instances = list(conn.get_all_autoscaling_instances())
    instances.should.have.length_of(2)
 
    conn.set_desired_capacity("tester_group", 2)