Beispiel #1
0
def test_subdict_with_one_element_and_no_required(test_dict):
    assert subdict(test_dict, optional=['a']) == {'a': 1}
    assert subdict(test_dict, optional=['b']) == {'b': 2}
    assert subdict(test_dict, optional=['c']) == {'c': 3}
Beispiel #2
0
def test_subdict_with_no_elements_and_no_required(test_dict):
    assert subdict(test_dict, expected=[], optional=[]) == {}