示例#1
0
def test_selectn_return_none():
    hash = {'info': {'name': {'full': 'ay'}}}

    name = selectn('info.name', hash)
    short = selectn('info.name.short', hash)

    assert name == hash['info']['name']
    assert short is None
示例#2
0
def test_selectn_return_none():
    hash = {"info": {"name": {"full": "ay"}}}

    name = selectn("info.name", hash)
    short = selectn("info.name.short", hash)

    assert name == hash["info"]["name"]
    assert short is None
示例#3
0
def test_selectn():
    hash = {'info': {'name': {'full': 'ay'}}}

    full = selectn('info.name.full', hash)

    assert full == 'ay'
示例#4
0
def test_selectn_empty_return_none():
    hash = {'info': True}

    short = selectn('info.name.short', hash)

    assert short is None
示例#5
0
def test_selectn():
    hash = {"info": {"name": {"full": "ay"}}}

    full = selectn("info.name.full", hash)

    assert full == "ay"
示例#6
0
def test_selectn_non_dict_return_none():
    hash = None

    short = selectn("info.name.short", hash)

    assert short is None
示例#7
0
def test_selectn_empty_return_none():
    hash = {"info": True}

    short = selectn("info.name.short", hash)

    assert short is None