@mock_ec2
def test_eip_associate_invalid_args():
    conn = boto.connect_ec2('the_key', 'the_secret')

    reservation = conn.run_instances('ami-1234abcd')
    instance = reservation.instances[0]

    eip = conn.allocate_address()

    with assert_raises(EC2ResponseError) as cm:
        conn.associate_address(instance_id=instance.id)
    cm.exception.code.should.equal('MissingParameter')
    cm.exception.status.should.equal(400)
    cm.exception.request_id.should_not.be.none

    instance.terminate()
Associate EIP, invalid args
dataset/ETHPy150Open spulec/moto/tests/test_ec2/test_elastic_ip_addresses.py/test_eip_associate_invalid_args