summaryrefslogtreecommitdiffstats
path: root/tests/test_pgspecial.py
diff options
context:
space:
mode:
authorDarik Gamble <darik.gamble@gmail.com>2015-02-27 10:04:59 -0500
committerDarik Gamble <darik.gamble@gmail.com>2015-02-27 10:04:59 -0500
commit5d44904aa3f7d25c0eba2ae2893d966fa64a0598 (patch)
treeb16231856c70d608a41afecf8867de33dab2da4a /tests/test_pgspecial.py
parent5189ace117b8c3fcf6e8bb97e7507fe79cfa4806 (diff)
\df suggests only schemas and functions
Diffstat (limited to 'tests/test_pgspecial.py')
-rw-r--r--tests/test_pgspecial.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_pgspecial.py b/tests/test_pgspecial.py
index 9d2834bc..e16631a2 100644
--- a/tests/test_pgspecial.py
+++ b/tests/test_pgspecial.py
@@ -27,3 +27,10 @@ def test_d_dot_suggests_schema_qualified_tables():
suggestions = suggest_type('\d myschema.xxx', '\d myschema.xxx')
assert suggestions == [{'type': 'table', 'schema': 'myschema'}]
+def test_df_suggests_schema_or_function():
+ suggestions = suggest_type('\\df xxx', '\\df xxx')
+ assert sorted_dicts(suggestions) == sorted_dicts([
+ {'type': 'function', 'schema': []}, {'type': 'schema'}])
+
+ suggestions = suggest_type('\\df myschema.xxx', '\\df myschema.xxx')
+ assert suggestions == [{'type': 'function', 'schema': 'myschema'}]