Skip to content
Snippets Groups Projects
Commit 9c9e6edd authored by Erik Reid's avatar Erik Reid
Browse files

add test that covers loading cache

test env assumes strings are in cache, so use
redis.set with strings (assume lib does encoding)
parent 0aea8ec3
Branches
No related tags found
No related merge requests found
...@@ -125,7 +125,7 @@ def routers(access): ...@@ -125,7 +125,7 @@ def routers(access):
result = json.dumps(result) result = json.dumps(result)
# cache this data for the next call # cache this data for the next call
redis.set(cache_key, result.encode('utf-8')) redis.set(cache_key, result)
if not result: if not result:
return Response( return Response(
......
...@@ -23,6 +23,11 @@ def test_public_routers(client): ...@@ -23,6 +23,11 @@ def test_public_routers(client):
assert all(r['type'] == 'CORE' for r in response_data) assert all(r['type'] == 'CORE' for r in response_data)
def test_with_cache(client):
test_public_routers(client)
test_public_routers(client)
@pytest.mark.skip(reason='IMS INTERNAL vs CORE calcualtion is not clear') @pytest.mark.skip(reason='IMS INTERNAL vs CORE calcualtion is not clear')
def test_internal_routers(client): def test_internal_routers(client):
rv = client.get( rv = client.get(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment