From dda500b83752232afe62f5f830777e37a0ebb8f7 Mon Sep 17 00:00:00 2001 From: 3hhh Date: Sat, 15 May 2021 12:33:24 +0200 Subject: [PATCH] mock qubesdb.rm() --- qubesagent/test_firewall.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qubesagent/test_firewall.py b/qubesagent/test_firewall.py index 909b3e4..5c107fc 100644 --- a/qubesagent/test_firewall.py +++ b/qubesagent/test_firewall.py @@ -29,6 +29,14 @@ class DummyQubesDB(object): except KeyError: return None + def rm(self, path): + if path.endswith('/'): + for key in self.entries: + if key.startswith(path): + self.entries.pop(key) + else: + self.entries.pop(path) + def multiread(self, prefix): result = {} for key, value in self.entries.items():