diff options
author | catherinedevlin <catherine.devlin@gmail.com> | 2018-05-15 10:52:51 -0400 |
---|---|---|
committer | Irina Truong <i.chernyavska@gmail.com> | 2018-06-16 21:46:31 -0700 |
commit | 675e1dbff26c42722493703c7a792bae97c7d538 (patch) | |
tree | fe66b2d651ce1c9374b5026c6aff5e9260944794 /tests | |
parent | aee99b9a40e17b07a252e388aff7a016691a043c (diff) |
Moved code to pgexecute
Diffstat (limited to 'tests')
-rw-r--r-- | tests/parseutils/test_parseutils.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/parseutils/test_parseutils.py b/tests/parseutils/test_parseutils.py index 4ffc7ee3..28918c07 100644 --- a/tests/parseutils/test_parseutils.py +++ b/tests/parseutils/test_parseutils.py @@ -1,5 +1,5 @@ import pytest -from pgcli.packages.parseutils.tables import extract_tables +from pgcli.packages.parseutils.tables import extract_tables, schema_table_split from pgcli.packages.parseutils.utils import find_prev_keyword, is_open_quote @@ -265,3 +265,12 @@ def test_is_open_quote__closed(sql): ]) def test_is_open_quote__open(sql): assert is_open_quote(sql) + + +def test_schema_table_split(): + assert schema_table_split('myschema.mytable') == ('myschema', 'mytable') + assert schema_table_split('mytable') == ('%', 'mytable') + assert schema_table_split('') == ('%', '') + assert schema_table_split('myschema.mytable.foo') == ( + 'myschema', 'mytable.foo') + assert schema_table_split('%') == ('%', '%') |