Skip to content

Commit 957b63a

Browse files
committed
Added/Updated tests\functional\view\create\test_01.py: Added 'SQL_SCHEMA_PREFIX' to be substituted in expected_* on FB 6.x
1 parent 9a7e978 commit 957b63a

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

tests/functional/view/create/test_01.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,28 @@
1010
import pytest
1111
from firebird.qa import *
1212

13-
init_script = """CREATE TABLE tb(id INT);
14-
commit;
15-
"""
13+
db = db_factory()
1614

17-
db = db_factory(init=init_script)
15+
test_script = """
16+
set list on;
17+
create table test(id int);
18+
commit;
19+
create view v_test as select * from test;
1820
19-
test_script = """CREATE VIEW test AS SELECT * FROM tb;
20-
SHOW VIEW test;
21+
insert into test(id) values(1);
22+
select id from v_test;
2123
"""
2224

23-
act = isql_act('db', test_script)
25+
substitutions = [('[ \t]+', ' ')]
26+
act = isql_act('db', test_script, substitutions = substitutions)
2427

25-
expected_stdout = """ID INTEGER Nullable
26-
View Source:
27-
==== ======
28-
SELECT * FROM tb
28+
expected_stdout = """
29+
ID 1
2930
"""
3031

3132
@pytest.mark.version('>=3.0')
3233
def test_1(act: Action):
34+
3335
act.expected_stdout = expected_stdout
34-
act.execute()
36+
act.execute(combine_output = True)
3537
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)