def test_vl_spec_for_color__defaults():
    """Check that defaults are according to spec"""
    color = api.Color('foobar')
    assert color.name == 'foobar'
    assert color.type is None
    assert color.aggregate is None
    assert color.timeUnit is None
    assert color.bin == False
    assert color.scale is None
    assert color.legend == True
    assert color.value == '#4682b4'
    assert color.opacity == 1.0

    color = api.Color('foobar:O')
    assert color.name == 'foobar'
    assert color.type == 'O'
    assert color.aggregate is None
    assert color.timeUnit is None
    assert color.bin == False
    assert color.scale is None
    assert color.legend == True
    assert color.value == '#4682b4'
    assert color.opacity == 1.0

    color = api.Color('sum(foobar):Q')
    assert color.name == 'foobar'
    assert color.type == 'Q'
    assert color.aggregate == 'sum'
    assert color.timeUnit is None
    assert color.bin == False
    assert color.scale is None
    assert color.legend == True
    assert color.value == '#4682b4'
    assert color.opacity == 1.0
dataset/ETHPy150Open ellisonbg/altair/altair/tests/test_api.py/test_vl_spec_for_color__defaults/original