def test_create_context_result_nested_vals(): assert create_context_result(DICT_1to5, TRANS_DICT_NESTED_VAL_12) == { 'one': { '1': 1 }, 'two': 2 }
def test_create_context_result_basic(): assert create_context_result(DICT_1to5, TRANS_DICT_134) == { 'one': 1, 'three': 3, 'four': 4 } assert 'one' not in DICT_1to5
def test_create_context_result_list(): assert create_context_result(DICT_LST_AAB2B, TRANS_DICT_LST_A2B) == { 'AaB': [{ 'two': 2 }, { 'two': 3 }], 'four': 4 } assert create_context_result(DICT_LST_NESTED, TRANS_DICT_LST_NESTED) == { 'Master': { 'ID': 1, 'Assets': [{ 'ID': 1, 'Name': 'a' }, { 'ID': 2, 'Name': 'b' }] } }
def test_create_context_result_nested_keys(): assert create_context_result(DICT_NESTED_123, TRANS_DICT_NESTED_12) == { 'one': 1, 'two': 2 }