From b11e0750476b140cea4f7af06cf83d82fbe988d0 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 19 Aug 2015 20:39:48 +0200 Subject: [PATCH] Add __getitem__ to ConfigStub. --- tests/helpers/stubs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/helpers/stubs.py b/tests/helpers/stubs.py index a826c2ea7..fed5c6417 100644 --- a/tests/helpers/stubs.py +++ b/tests/helpers/stubs.py @@ -293,6 +293,9 @@ class ConfigStub(QObject): super().__init__(parent) self.data = {} + def __getitem__(self, name): + return self.section(name) + def section(self, name): """Get a section from the config.