def test_injecting_function_will_work():
    @inject(s=str)
    def function(s):
        return 'Got %s' % s

    def configure(binder):
        binder.bind(str, to='123')

    injector = Injector(configure)
    wrapped = injector.get(function)
    assert wrapped.__name__ == function.__name__
    result = wrapped()
    assert result == 'Got 123'
dataset/ETHPy150Open alecthomas/injector/injector_test.py/test_injecting_function_will_work/original