From ed5b9083710c6f3c53a59bf7ecbc10aa742b0806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 12 Aug 2020 02:01:31 +0200 Subject: [PATCH] tests: fix duplicated entries in TestVMsCollection Deduplicate entries when iterating over TestVMsCollection values. Some tests add given VM multiple times, to have it available under different kind of keys (name, uuid etc) - similar to the real VMsCollection. --- qubes/tests/vm/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/tests/vm/__init__.py b/qubes/tests/vm/__init__.py index c5e09ac8..a152759b 100644 --- a/qubes/tests/vm/__init__.py +++ b/qubes/tests/vm/__init__.py @@ -56,7 +56,7 @@ class TestVMsCollection(dict): self.clear() def __iter__(self): - return iter(self.values()) + return iter(set(self.values())) class TestVolume(object): def __init__(self, pool):