@mock_ec2_deprecated
def test_tag_limit_exceeded():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances(EXAMPLE_AMI_ID)
    instance = reservation.instances[0]
    tag_dict = {}
    for i in range(51):
        tag_dict['{0:02d}'.format((i + 1))] = ''
    with pytest.raises(EC2ResponseError) as cm:
        conn.create_tags(instance.id, tag_dict)
    cm.value.code.should.equal('TagLimitExceeded')
    cm.value.status.should.equal(400)
    instance.add_tag('a key', 'a value')
    with pytest.raises(EC2ResponseError) as cm:
        conn.create_tags(instance.id, tag_dict)
    cm.value.code.should.equal('TagLimitExceeded')
    cm.value.status.should.equal(400)
    tags = conn.get_all_tags()
    tag = tags[0]
    tags.should.have.length_of(1)
    tag.name.should.equal('a key')
    tag.value.should.equal('a value')
@mock_ec2_deprecated
def test_tag_limit_exceeded():
    conn = boto.connect_ec2('the_key', 'the_secret')
    reservation = conn.run_instances(EXAMPLE_AMI_ID)
    instance = reservation.instances[0]
    tag_dict = {}
    for i in range(51):
        tag_dict['{0:02d}'.format((i + 1))] = 
    with pytest.raises(EC2ResponseError) as cm:
        conn.create_tags(instance.id, tag_dict)
    cm.value.code.should.equal('TagLimitExceeded')
    cm.value.status.should.equal(400)
    instance.add_tag('a key', 'a value')
    with pytest.raises(EC2ResponseError) as cm:
        conn.create_tags(instance.id, tag_dict)
    cm.value.code.should.equal('TagLimitExceeded')
    cm.value.status.should.equal(400)
    tags = conn.get_all_tags()
    tag = tags[0]
    tags.should.have.length_of(1)
    tag.name.should.equal('a key')
    tag.value.should.equal('a value')