summaryrefslogtreecommitdiffstats
path: root/tests/metadata.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:17:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-09-06 04:17:09 +0000
commit76d27bc43d56d7ef3ca0090fb199777888adf7c3 (patch)
treeb6d3d562a0be03d404426bb43aff62174be3dc5e /tests/metadata.py
parentAdding upstream version 3.1.0. (diff)
downloadpgcli-upstream/3.2.0.tar.xz
pgcli-upstream/3.2.0.zip
Adding upstream version 3.2.0.upstream/3.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/metadata.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/metadata.py b/tests/metadata.py
index 2f89ea2..4ebcccd 100644
--- a/tests/metadata.py
+++ b/tests/metadata.py
@@ -3,7 +3,7 @@ from itertools import product
from pgcli.packages.parseutils.meta import FunctionMetadata, ForeignKey
from prompt_toolkit.completion import Completion
from prompt_toolkit.document import Document
-from mock import Mock
+from unittest.mock import Mock
import pytest
parametrize = pytest.mark.parametrize
@@ -59,7 +59,7 @@ def wildcard_expansion(cols, pos=-1):
return Completion(cols, start_position=pos, display_meta="columns", display="*")
-class MetaData(object):
+class MetaData:
def __init__(self, metadata):
self.metadata = metadata
@@ -128,7 +128,7 @@ class MetaData(object):
]
def schemas(self, pos=0):
- schemas = set(sch for schs in self.metadata.values() for sch in schs)
+ schemas = {sch for schs in self.metadata.values() for sch in schs}
return [schema(escape(s), pos=pos) for s in schemas]
def functions_and_keywords(self, parent="public", pos=0):