def test_resolve_dict(dictionary, data, result): assert Resolver.dictionary(dictionary, data) == result
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()
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()}
def test_resolver_dictionary_empty(): assert Resolver.dictionary({}, 'data') == {}