fixed tests

This commit is contained in:
Dylan
2022-10-09 00:14:56 +01:00
parent 089dfab5d6
commit fe9642b6db
2 changed files with 6 additions and 3 deletions

View File

@ -6,7 +6,7 @@ import os
import boto3
link_cache_system = config['config']['link_cache']
link_cache = {}
DYNAMO_CACHE_TBL=None
if link_cache_system=="dynamodb": # pragma: no cover
DYNAMO_CACHE_TBL=config['config']['table']
@ -134,7 +134,10 @@ def clearCache():
link_cache={}
def setCache(value):
newCache = {}
for key in value:
newCache[key.lower()] = value[key]
global link_cache
# only intended for use in tests
if link_cache_system == "ram":
link_cache=value
link_cache=newCache