Example #1
0
def test_resolve_dict(dictionary, data, result):
    assert Resolver.dictionary(dictionary, data) == result
Example #2
0
def test_resolver_object_dictionary(patch):
    patch.object(Resolver, 'dictionary')
    result = Resolver.object({'$OBJECT': 'dictionary'}, 'data')
    Resolver.dictionary.assert_called_with({'$OBJECT': 'dictionary'}, 'data')
    assert result == Resolver.dictionary()
Example #3
0
def test_resolver_dictionary(patch):
    patch.object(Resolver, 'resolve')
    result = Resolver.dictionary({'key': 'value'}, 'data')
    Resolver.resolve.assert_called_with('value', 'data')
    assert result == {'key': Resolver.resolve()}
Example #4
0
def test_resolver_dictionary_empty():
    assert Resolver.dictionary({}, 'data') == {}