jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Tests: Make DummySiteinfo API compatible with Siteinfo ......................................................................
[FIX] Tests: Make DummySiteinfo API compatible with Siteinfo
Change-Id: I982854e5d3f731534dbb12c3f899332ddb7240c0 --- M tests/utils.py 1 file changed, 8 insertions(+), 2 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/tests/utils.py b/tests/utils.py index f30a945..7f1bc62 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -98,7 +98,10 @@ def __getitem__(self, key): return self.get(key, False)
- def get(self, key, get_default=True, cache=True, force=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 + force = expiry is not False if not force and key in self._cache: loaded = self._cache[key] if not loaded[1] and not get_default: @@ -108,7 +111,7 @@ elif get_default: default = pywikibot.site.Siteinfo._get_default(key) if cache: - self._cache[key] = (default, True) + self._cache[key] = (default, False) return default else: raise KeyError(key) @@ -118,3 +121,6 @@
def is_recognised(self, key): return None + + def get_requested_time(self, key): + return False
pywikibot-commits@lists.wikimedia.org