XZise has submitted this change and it was merged.
Change subject: Enable setting DummySiteinfo content dict directly ......................................................................
Enable setting DummySiteinfo content dict directly
- may be used by dry_site_tests e.g. see I968e1faad475b0c4d9ebfa6730a8d03ada6fe58a or examples
Change-Id: I5d8790c9b1ab11d00280ca66f9a729ec3cf44054 --- M tests/utils.py 1 file changed, 3 insertions(+), 0 deletions(-)
Approvals: XZise: Looks good to me, approved
diff --git a/tests/utils.py b/tests/utils.py index 3e3213a..e59f959 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -26,6 +26,9 @@ def __getitem__(self, key): return self.get(key, False)
+ def __setitem__(self, key, value): + self._cache[key] = (value, False) + def get(self, key, get_default=True, cache=True, expiry=False): # Default values are always expired, so only expiry=False doesn't force # a reload