Example #1
0
def test_resolver_file():
    assert Resolver.file('filename', {}) == 'filename'
Example #2
0
def test_resolver_file_values(patch):
    patch.object(Resolver, 'values', return_value=['a'])
    result = Resolver.file('{}.py', {}, values=['values'])
    Resolver.values.assert_called_with(['values'], {})
    assert result == 'a.py'
Example #3
0
def test_resolver_object_file_values(patch):
    patch.object(Resolver, 'file')
    item = {'$OBJECT': 'file', 'string': 'filename', 'values': ['values']}
    result = Resolver.object(item, 'data')
    Resolver.file.assert_called_with(item['string'], 'data', values=['values'])
    assert result == Resolver.file()