diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:17:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-09-06 04:17:09 +0000 |
commit | 76d27bc43d56d7ef3ca0090fb199777888adf7c3 (patch) | |
tree | b6d3d562a0be03d404426bb43aff62174be3dc5e /tests/metadata.py | |
parent | Adding upstream version 3.1.0. (diff) | |
download | pgcli-0a3ece104da9fc141527935ef80d1c5712b8f6e0.tar.xz pgcli-0a3ece104da9fc141527935ef80d1c5712b8f6e0.zip |
Adding upstream version 3.2.0.upstream/3.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/metadata.py')
-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): |