def test_bdb_quit(mocker):
mocker.patch('ldap2pg.script.dictConfig', autospec=True)
w = mocker.patch('ldap2pg.script.wrapped_main')
from ldap2pg.script import main, pdb
w.side_effect = pdb.bdb.BdbQuit()
with pytest.raises(SystemExit) as ei:
main()
assert os.EX_SOFTWARE == ei.value.code
评论列表
文章目录