diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:17:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:17:24 +0000 |
commit | 9b77fda0d4171f68760c070895dc5700cb6d1e0f (patch) | |
tree | 37912945e9d35ef62e5a4a1eb07ac224307e5db6 /tests/metadata.py | |
parent | Releasing debian version 3.1.0-3. (diff) | |
download | pgcli-9b77fda0d4171f68760c070895dc5700cb6d1e0f.tar.xz pgcli-9b77fda0d4171f68760c070895dc5700cb6d1e0f.zip |
Merging upstream version 3.2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/metadata.py | 6 |
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): |