def test_vl_spec_for_size_changes():
    size = api.Size('foobar', type='Q', aggregate='sum', timeUnit='minutes', bin=api.Bin(), scale=api.Scale(),
                    legend=False, value=0, sort=[api.SortItems()])
    assert size.name == 'foobar'
    assert size.type == 'Q'
    assert size.aggregate == 'sum'
    assert size.timeUnit == 'minutes'
    assert size.bin.to_dict() == api.Bin().to_dict()
    assert size.scale.to_dict() == api.Scale().to_dict()
    assert size.legend == False
    assert size.value == 0
    assert size.sort[0].to_dict() == api.SortItems().to_dict()

    size.shorthand = 'avg(foobar):O'
    assert size.name == 'foobar'
    assert size.type == 'O'
    assert size.aggregate == 'avg'
    assert size.timeUnit == 'minutes'
    assert size.bin.to_dict() == api.Bin().to_dict()
    assert size.scale.to_dict() == api.Scale().to_dict()
    assert size.legend == False
    assert size.value == 0
    assert size.sort[0].to_dict() == api.SortItems().to_dict()
Function enforces non-null value for keypairs name field.
dataset/ETHPy150Open ellisonbg/altair/altair/tests/test_api.py/test_vl_spec_for_size_changes--crossover with--dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/db/sqlalchemy/migrate_repo/versions/280_add_nullable_false_to_keypairs_name.py/upgrade