Beispiel #1
0
def test_resolver_argument(patch):
    patch.object(Resolver, 'object')
    result = Resolver.argument('argument', {})
    Resolver.object.assert_called_with('argument', {})
    assert result == Resolver.object()
Beispiel #2
0
def test_resolver_object_argument(patch):
    patch.object(Resolver, 'argument')
    item = {'$OBJECT': 'argument', 'argument': {}}
    result = Resolver.object(item, 'data')
    Resolver.argument.assert_called_with({}, 'data')
    assert result == Resolver.argument()