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

convert redis returned binaries to strings

parent 85039759
No related branches found
No related tags found
No related merge requests found
...@@ -48,5 +48,5 @@ def routers(): ...@@ -48,5 +48,5 @@ def routers():
host=redis_config["hostname"], host=redis_config["hostname"],
port=redis_config["port"]) port=redis_config["port"])
return Response( return Response(
json.dumps(list(r.keys("*"))), json.dumps(list([k.decode("utf-8") for k in r.keys("*")])),
mimetype="application/json") mimetype="application/json")
...@@ -184,7 +184,7 @@ class MockedRedis(object): ...@@ -184,7 +184,7 @@ class MockedRedis(object):
MockedRedis.db[key] = value MockedRedis.db[key] = value
def keys(self, *args, **kwargs): def keys(self, *args, **kwargs):
return MockedRedis.db.keys() return list([k.encode("utf-8") for k in MockedRedis.db.keys()])
def test_routers_list(mocker, client): def test_routers_list(mocker, client):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment