Skip to content

Commit 9a7e978

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

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

tests/functional/view/create/test_02.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +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+
create view v_test as select id, 5 as x from test;
1819
19-
test_script = """CREATE VIEW test (id,num) AS SELECT id,5 FROM tb;
20-
SHOW VIEW test;
20+
insert into test(id) values(1);
21+
select * from v_test;
2122
"""
2223

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

25-
expected_stdout = """ID INTEGER Nullable
26-
NUM INTEGER Expression
27-
View Source:
28-
==== ======
29-
SELECT id,5 FROM tb
27+
expected_stdout = """
28+
ID 1
29+
X 5
3030
"""
3131

3232
@pytest.mark.version('>=3.0')
3333
def test_1(act: Action):
34+
3435
act.expected_stdout = expected_stdout
35-
act.execute()
36+
act.execute(combine_output = True)
3637
assert act.clean_stdout == act.clean_expected_stdout

0 commit comments

Comments
 (0)