예제 #1
0
def test_1(act: Action, capsys):
    sql_text = (act.files_dir / 'core_4766.sql').read_text()
    subs = {'dsn': act.db.dsn, 'user_name': act.db.user, 'user_password': act.db.password,
            'current_auth_plugin': None,}
    for current_auth_plugin in ['Srp', 'Legacy_UserManager']:
        subs['current_auth_plugin'] = current_auth_plugin
        act.isql(switches=['-q'], input=sql_text % subs, combine_output=True)
        for line in act.stdout.splitlines():
            if line.strip():
                print(current_auth_plugin[:3] + ': ' + line)
    #
    act.reset()
    act.expected_stdout = expected_stdout_1
    act.stdout = capsys.readouterr().out
    assert act.clean_stdout == act.clean_expected_stdout
예제 #2
0
def test_2(act: Action, capsys):
    sql_text = (act.files_dir / 'core_4766.sql').read_text()
    # ::: NB :::
    # Only Legacy_UserManager is checked for FB 4.0. Srp has totally different behaviour,
    # at  least for 4.0.0.1714.
    # Sent letter to dimitr and alex, 05.01.2020 22:00.
    subs = {'dsn': act.db.dsn, 'user_name': act.db.user, 'user_password': act.db.password,
            'current_auth_plugin': None,}
    for current_auth_plugin in ['Legacy_UserManager']:
        subs['current_auth_plugin'] = current_auth_plugin
        act.isql(switches=['-q'], input=sql_text % subs, combine_output=True)
        for line in act.stdout.splitlines():
            if line.strip():
                print(current_auth_plugin[:3] + ': ' + line)
    #
    act.reset()
    act.expected_stdout = expected_stdout_2
    act.stdout = capsys.readouterr().out
    assert act.clean_stdout == act.clean_expected_stdout
예제 #3
0
def test_1(act: Action):
    act.expected_stdout = expected_stdout
    act.execute()
    assert act.clean_stdout == act.clean_expected_stdout
예제 #4
0
def test_1(act: Action):
    act.execute()