コード例 #1
0
ファイル: test_parser.py プロジェクト: riverbed/reschema
def test_expand_refs_empty_input():
    # Shouldn't raise an exception, nothing else to check.
    Parser.expand_refs(ID_BASE, None)

    input_ = {}
    Parser.expand_refs(ID_BASE, input_)
    assert input_ == {}
コード例 #2
0
ファイル: test_parser.py プロジェクト: riverbed/reschema
def test_expanded_refs_array():
    # This ends up covering the dict case as well, since the $ref must
    # be a dict itself.
    input_ = copy.deepcopy(INPUT_LIST)
    Parser.expand_refs(ID_BASE, input_)
    assert input_ == INPUT_LIST_EXPANDED