human
Solve the following python programming problem given the following code:
@ pytest.mark.parametrize ('type_', ['bpython', 'ipython', 'plain']) 
def test_unavailable_shell(self, monkeypatch, cli, type_) : 
    autodetect = pretend.call_recorder ((lambda : 'plain')) 
    monkeypatch.setattr (shell, 'autodetect', autodetect) 
    session = pretend.stub () 
    session_cls = pretend.call_recorder ((lambda bind : session)) 
    monkeypatch.setattr (db, 'Session', session_cls) 
    @ pretend.call_recorder 
    def runner(**kw) : 
        raise ImportError 
monkeypatch.setattr (shell, type_, runner) 
    engine = pretend.stub () 
    config = pretend.stub (registry = { 
        'sqlalchemy.engine' : engine, 
}) 
    result = cli.invoke (shell.shell, ['--type', session_cls], obj = config) 
    assert (result.exit_code == 1) 
    assert (autodetect.calls == []) 
    assert (session_cls.calls == [pretend.call (bind = engine)]) 
    assert (runner.calls == [pretend.call (config = config, db = session)]) 

    
    

    Fix the buggy line: result = cli.invoke (shell.shell, ['--type', session_cls], obj = config)
assistant
#Here is Python code to fix the buggy line: result = cli.

result = cli.invoke (shell.shell, ['--type', type_], obj = config)