mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[PR #11342/266d9d3f backport][stable-12] batch 2 - update Python idiom to 3.7 using pyupgrade (#11345)
batch 2 - update Python idiom to 3.7 using pyupgrade (#11342)
* batch 2 - update Python idiom to 3.7 using pyupgrade
* Apply suggestions from code review
(cherry picked from commit 266d9d3fb0)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -14,7 +14,7 @@ from ansible_collections.community.general.plugins.lookup.onepassword import (
|
||||
|
||||
|
||||
def load_file(file):
|
||||
with open((os.path.join(os.path.dirname(__file__), "onepassword_fixtures", file)), "r") as f:
|
||||
with open(os.path.join(os.path.dirname(__file__), "onepassword_fixtures", file)) as f:
|
||||
return json.loads(f.read())
|
||||
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ class TestLookupModule(unittest.TestCase):
|
||||
def test_bitwarden_plugin_duplicates(self):
|
||||
# There are two records with name dupe_name; we need to be order-insensitive with
|
||||
# checking what was retrieved.
|
||||
self.assertEqual(set(["b", "d"]), set(self.lookup.run(["dupe_name"], field="password")[0]))
|
||||
self.assertEqual({"b", "d"}, set(self.lookup.run(["dupe_name"], field="password")[0]))
|
||||
|
||||
@patch("ansible_collections.community.general.plugins.lookup.bitwarden._bitwarden", new=MockBitwarden())
|
||||
def test_bitwarden_plugin_full_item(self):
|
||||
|
||||
Reference in New Issue
Block a user