6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 21:43:06 +01:00
firebird-qa/tests/bugs/core_3008_test.py

42 lines
1.0 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
2022-01-22 21:59:15 +01:00
"""
ID: issue-3389
ISSUE: 3389
TITLE: Add attachment's CHARACTER SET name into corresponding trace records
DESCRIPTION:
JIRA: CORE-3008
FBTEST: bugs.core_3008
2022-01-22 21:59:15 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
import pytest
from firebird.qa import *
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
db = db_factory()
2021-11-16 19:44:53 +01:00
2022-01-22 21:59:15 +01:00
act = python_act('db', substitutions=[('^((?!ERROR|ELEMENT|SYSDBA:NONE).)*$', ''),
('.*SYSDBA:NONE', 'SYSDBA:NONE'), ('TCPV.*', 'TCP')])
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
expected_stdout = """
2021-04-26 20:07:00 +02:00
SYSDBA:NONE, UTF8, TCP
SYSDBA:NONE, UTF8, TCP
SYSDBA:NONE, ISO88591, TCP
SYSDBA:NONE, ISO88591, TCP
2021-11-16 19:44:53 +01:00
"""
2021-04-26 20:07:00 +02:00
2022-01-22 21:59:15 +01:00
trace = ['log_connections = true',
'time_threshold = 0',
]
2021-04-26 20:07:00 +02:00
@pytest.mark.trace
2021-11-16 19:44:53 +01:00
@pytest.mark.version('>=3.0')
2022-01-22 21:59:15 +01:00
def test_1(act: Action):
with act.trace(db_events=trace):
with act.db.connect(charset='utf8'):
pass
2022-01-22 21:59:15 +01:00
with act.db.connect(charset='iso8859_1'):
pass
2022-01-22 21:59:15 +01:00
act.expected_stdout = expected_stdout
act.trace_to_stdout(upper=True)
assert act.clean_stdout == act.clean_expected_stdout