示例#1
0
def test_simple_negative():
    eq_(
        join_left(
            [{'a': 1, 'b': 2}],
            [{'a': 2, 'b': 3}],
            'a'),
        [{'a': 1, 'b': 2}],
        "1 empty dictionary"
    )
示例#2
0
def test_two_dict():
    eq_(
        join_left(
            [{'a': 1, 'b': 2}],
            [{'a': 1, 'c': 3}, {'a': 1, 'c': 4}],
            'a')
        ,
        [
            {'a': 1, 'b': 2, 'c': 3},
            {'a': 1, 'b': 2, 'c': 4}
        ],
        "1 empty dictionary"
    )
示例#3
0
def test_empty():
    eq_(join_left([{}], [{}], 'a'), [{}], "2 empty dictionaries")
示例#4
0
def test_second_empty():
    eq_(join_left([{'a': 1}], [{}], 'a'), [{'a': 1}], "1 empty dictionary")