~ubuntu-branches/ubuntu/quantal/nova/quantal-security

« back to all changes in this revision

Viewing changes to nova/tests/api/openstack/volume/test_extensions.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Adam Gandelman
  • Date: 2012-06-22 12:39:57 UTC
  • mfrom: (1.1.57)
  • Revision ID: package-import@ubuntu.com-20120622123957-hbzwg84nt9rqwg8r
Tags: 2012.2~f2~20120621.14517-0ubuntu1
[ Chuck Short ]
* New upstream version.

[ Adam Gandelman ]
* debian/rules: Temporarily disable test suite while blocking
  tests are investigated. 
* debian/patches/kombu_tests_timeout.patch: Dropped.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#    License for the specific language governing permissions and limitations
17
17
#    under the License.
18
18
 
19
 
import json
20
 
 
21
19
import iso8601
22
20
from lxml import etree
23
21
import webob
25
23
from nova.api.openstack import volume
26
24
from nova.api.openstack import xmlutil
27
25
from nova import flags
 
26
from nova.openstack.common import jsonutils
28
27
from nova import test
29
28
 
30
29
FLAGS = flags.FLAGS
59
58
        self.assertEqual(200, response.status_int)
60
59
 
61
60
        # Make sure we have all the extensions, extra extensions being OK.
62
 
        data = json.loads(response.body)
 
61
        data = jsonutils.loads(response.body)
63
62
        names = [str(x['name']) for x in data['extensions']
64
63
                 if str(x['name']) in self.ext_list]
65
64
        names.sort()
86
85
            url = '/fake/extensions/%s' % ext['alias']
87
86
            request = webob.Request.blank(url)
88
87
            response = request.get_response(app)
89
 
            output = json.loads(response.body)
 
88
            output = jsonutils.loads(response.body)
90
89
            self.assertEqual(output['extension']['alias'], ext['alias'])
91
90
 
92
91
    def test_get_extension_json(self):
95
94
        response = request.get_response(app)
96
95
        self.assertEqual(200, response.status_int)
97
96
 
98
 
        data = json.loads(response.body)
 
97
        data = jsonutils.loads(response.body)
99
98
        self.assertEqual(data['extension'], {
100
99
                "namespace": "http://www.fox.in.socks/api/ext/pie/v1.0",
101
100
                "name": "Fox In Socks",