Revision 2e90e666 snf-pithos-app/pithos/api/test/__init__.py

b/snf-pithos-app/pithos/api/test/__init__.py
47 47

  
48 48
from synnefo.lib.services import get_service_path
49 49
from synnefo.lib import join_urls
50
from synnefo.util import text
51 50

  
52 51
from django.test import TestCase
53 52
from django.test.client import Client, MULTIPART_CONTENT, FakePayload
54 53
from django.test.simple import DjangoTestSuiteRunner
55 54
from django.conf import settings
56 55
from django.utils.http import urlencode
56
from django.utils.encoding import smart_unicode
57 57
from django.db.backends.creation import TEST_DATABASE_PREFIX
58 58

  
59 59
import django.utils.simplejson as json
......
230 230
        mock_validate_token = self.create_patch(
231 231
            'astakosclient.AstakosClient.validate_token')
232 232
        mock_validate_token.return_value = {
233
            'access': {'user': {'id': text.udec(self.user, 'utf8')}}}
233
            'access': {
234
                'user': {'id': smart_unicode(self.user, encoding='utf-8')}}
235
            }
234 236

  
235 237
        # patch astakosclient.AstakosClient.get_token
236 238
        mock_get_token = self.create_patch(

Also available in: Unified diff