jenkins-bot submitted this change.
[cleanup] Remove outdated intoken from TestRequest
intoken isn't used by any request
Bug: T291202
Change-Id: Ice16d5c8d3410c9ebbfa2ef25430aaf9f5074fe9
---
M tests/__init__.py
1 file changed, 7 insertions(+), 16 deletions(-)
diff --git a/tests/__init__.py b/tests/__init__.py
index 68a10a3..f802c45 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -304,30 +304,21 @@
"""Never invalidate cached data."""
return False
- def _load_cache(self):
+ def _load_cache(self) -> bool:
"""Return whether the cache can be used."""
if not super()._load_cache():
return False
- # tokens need careful management in the cache
- # and can't be aggressively cached.
- # FIXME: remove once 'badtoken' is reliably handled in api.py
- for desc in ('intoken', 'lgpassword'):
- if desc in self._uniquedescriptionstr():
- self._data = None
- return False
+ if 'lgpassword' in self._uniquedescriptionstr():
+ self._data = None
+ return False
return True
- def _write_cache(self, data):
+ def _write_cache(self, data) -> None:
"""Write data except login details."""
- if 'intoken' in self._uniquedescriptionstr():
- return None
-
- if 'lgpassword' in self._uniquedescriptionstr():
- return None
-
- return super()._write_cache(data)
+ if 'lgpassword' not in self._uniquedescriptionstr():
+ super()._write_cache(data)
original_expired = None
To view, visit change 722547. To unsubscribe, or for help writing mail filters, visit settings.