Revision b4b82ec4 snf-cyclades-app/synnefo/userdata/tests.py
b/snf-cyclades-app/synnefo/userdata/tests.py | ||
---|---|---|
1 |
# Copyright 2011 GRNET S.A. All rights reserved. |
|
1 |
# Copyright 2011, 2012, 2013 GRNET S.A. All rights reserved.
|
|
2 | 2 |
# |
3 | 3 |
# Redistribution and use in source and binary forms, with or |
4 | 4 |
# without modification, are permitted provided that the following |
... | ... | |
46 | 46 |
def get_user_mock(request, *args, **kwargs): |
47 | 47 |
if request.META.get('HTTP_X_AUTH_TOKEN', None) == '0000': |
48 | 48 |
request.user_uniq = 'test' |
49 |
request.user = {'id': 'id', |
|
50 |
'username': 'username', |
|
51 |
'uuid': 'test'} |
|
49 |
request.user = {"access": { |
|
50 |
"token": { |
|
51 |
"expires": "2013-06-19T15:23:59.975572+00:00", |
|
52 |
"id": "token", |
|
53 |
"tenant": { |
|
54 |
"id": "test", |
|
55 |
"name": "Firstname Lastname" |
|
56 |
} |
|
57 |
}, |
|
58 |
"serviceCatalog": [], |
|
59 |
"user": { |
|
60 |
"roles_links": [], |
|
61 |
"id": "test", |
|
62 |
"roles": [{"id": 1, "name": "default"}], |
|
63 |
"name": "Firstname Lastname"}} |
|
64 |
} |
|
52 | 65 |
|
53 | 66 |
|
54 | 67 |
class AaiClient(Client): |
Also available in: Unified diff