mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
models: Add clear_client_cache function to clear get_client_cache.
This is a prep commit, this function will be used when we want to reset the test environment of the puppeteer test.
This commit is contained in:
@@ -1821,6 +1821,11 @@ class Client(models.Model):
|
||||
get_client_cache: Dict[str, Client] = {}
|
||||
|
||||
|
||||
def clear_client_cache() -> None: # nocoverage
|
||||
global get_client_cache
|
||||
get_client_cache = {}
|
||||
|
||||
|
||||
def get_client(name: str) -> Client:
|
||||
# Accessing KEY_PREFIX through the module is necessary
|
||||
# because we need the updated value of the variable.
|
||||
|
||||
Reference in New Issue
Block a user