Commit 4b819fe9 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

snf_django: Decode the mocked userid to a unicode object

parent dfb5c91c
......@@ -35,7 +35,7 @@
from contextlib import contextmanager
from django.test import TestCase
from django.utils import simplejson as json
from synnefo.util.text import uenc
from synnefo.util.text import udec
from mock import patch
......@@ -133,7 +133,7 @@ def astakos_user(user):
with patch("snf_django.lib.api.get_token") as get_token:
get_token.return_value = "DummyToken"
with patch('astakosclient.AstakosClient.get_user_info') as m:
m.return_value = {"uuid": uenc(user, 'utf8')}
m.return_value = {"uuid": udec(user, 'utf8')}
with patch('astakosclient.AstakosClient.get_quotas') as m2:
m2.return_value = {
"system": {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment