~gandelman-a/ubuntu/precise/keystone/UCA_2012.2.1

« back to all changes in this revision

Viewing changes to tests/test_s3_token_middleware.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2012-07-06 10:37:01 UTC
  • mfrom: (1.1.20)
  • Revision ID: package-import@ubuntu.com-20120706103701-rswdykm7fqypbavg
Tags: 2012.2~f2-0ubuntu1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# License for the specific language governing permissions and limitations
15
15
# under the License.
16
16
 
17
 
import json
18
17
import logging
19
18
 
20
19
import stubout
24
23
from swift.common import utils as swift_utils
25
24
 
26
25
from keystone.middleware import s3_token
 
26
from keystone.openstack.common import jsonutils
27
27
 
28
28
 
29
29
def denied_request(code):
74
74
            raise Exception
75
75
        ret = {'access': {'token': {'id': 'TOKEN_ID',
76
76
                                    'tenant': {'id':  'TENANT_ID'}}}}
77
 
        body = json.dumps(ret)
 
77
        body = jsonutils.dumps(ret)
78
78
        status = self.status
79
79
        self.resp = FakeHTTPResponse(status, body)
80
80