Esempio n. 1
0
def test_permutations_bigger():
    d = {'a': 'A', 'b': 'B', 'c': 'C'}
    assert list(key_permutations(['a', 'b', 'c'], d)) == [{
        'a': 'A',
        'b': 'B',
        'c': 'C'
    }, {
        'a': 'A',
        'b': 'B',
        'c': ANY
    }, {
        'a': 'A',
        'b': ANY,
        'c': 'C'
    }, {
        'a': 'A',
        'b': ANY,
        'c': ANY
    }, {
        'a': ANY,
        'b': 'B',
        'c': 'C'
    }, {
        'a': ANY,
        'b': 'B',
        'c': ANY
    }, {
        'a': ANY,
        'b': ANY,
        'c': 'C'
    }, {
        'a': ANY,
        'b': ANY,
        'c': ANY
    }]
Esempio n. 2
0
def test_permutations():
    d = {'a': 'A', 'b': 'B'}
    assert list(key_permutations(['a', 'b'], d)) == [
        {'a': 'A', 'b': 'B'},
        {'a': 'A', 'b': ANY},
        {'a': ANY, 'b': 'B'},
        {'a': ANY, 'b': ANY}]
Esempio n. 3
0
def test_permutations():
    d = {"a": "A", "b": "B"}
    assert list(key_permutations(["a", "b"], d)) == [
        {"a": "A", "b": "B"},
        {"a": "A", "b": ANY},
        {"a": ANY, "b": "B"},
        {"a": ANY, "b": ANY},
    ]
Esempio n. 4
0
def test_permutations_bigger():
    d = {"a": "A", "b": "B", "c": "C"}
    assert list(key_permutations(["a", "b", "c"], d)) == [
        {"a": "A", "b": "B", "c": "C"},
        {"a": "A", "b": "B", "c": ANY},
        {"a": "A", "b": ANY, "c": "C"},
        {"a": "A", "b": ANY, "c": ANY},
        {"a": ANY, "b": "B", "c": "C"},
        {"a": ANY, "b": "B", "c": ANY},
        {"a": ANY, "b": ANY, "c": "C"},
        {"a": ANY, "b": ANY, "c": ANY},
    ]
Esempio n. 5
0
def test_permutations():
    d = {'a': 'A', 'b': 'B'}
    assert list(key_permutations(['a', 'b'], d)) == [{
        'a': 'A',
        'b': 'B'
    }, {
        'a': 'A',
        'b': ANY
    }, {
        'a': ANY,
        'b': 'B'
    }, {
        'a': ANY,
        'b': ANY
    }]