MCPcopy
hub / github.com/dbcli/pgcli / test_view_definition

Function test_view_definition

tests/test_pgexecute.py:709–718  ·  view source on GitHub ↗
(executor)

Source from the content-addressed store, hash-verified

707
708@dbtest
709def test_view_definition(executor):
710 run(executor, "create table tbl1 (a text, b numeric)")
711 run(executor, "create view vw1 AS SELECT * FROM tbl1")
712 run(executor, "create materialized view mvw1 AS SELECT * FROM tbl1")
713 result = executor.view_definition("vw1")
714 assert 'VIEW "public"."vw1" AS' in result
715 assert "FROM tbl1" in result
716 # import pytest; pytest.set_trace()
717 result = executor.view_definition("mvw1")
718 assert "MATERIALIZED VIEW" in result
719
720
721@dbtest

Callers

nothing calls this directly

Calls 2

runFunction · 0.90
view_definitionMethod · 0.80

Tested by

no test coverage detected